• I have a custom-made script, running a bookingsystem. I would like to have all the clients at the bookingsystem, automatic imported to my wordpress site as normal users.
    At the bookingsystem all users are registred with a username, email, frontname and lastname in a mysql database.
    Does a plugin with that ability already exist? I have been searching for hours now, but without luck.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi iamdanieljs,

    If your bookingsystem columns format are exactly like wp_users columns, it will be easier to migrate the data to wp_users table with some plugin; otherwise, it won’t be easy.

    If you can explain in full detail here; i will help you.

    Or, you can post this issue in WP Jobs Section and get a WP expert to do it.

    Cheers.

    Thread Starter iamdanieljs

    (@iamdanieljs)

    Hi Ncej
    The users are stored in a table called eventbooking_clients… also the name of the columns are different from the once at the wordpress – But the content is almost the same… loginname, name, email, phone etc.
    Thanks ??

    Hi iamdanieljs,

    You can create your own script to handle this task. Its very simple task though.

    You have to create custom database connection for fetching data from eventbooking_clients table
    Create one array namely users to get users data from eventbooking_clients table.
    Close this database connection after getting all the users in array.

    //For Example

    foreach($users as $user){
       $user_id = username_exists( $user['user_name'] );
       if ( !$user_id and email_exists($user['mail']) == false ) {
          $random_password = wp_generate_password( $length=12,
                             $include_standard_special_chars=false );
          $user_id = wp_create_user($user['user_name'], $random_password,  $user['email']);
      } else {
        $random_password = __('User already exists.  Password inherited.');
      }
    }

    If you want to do this task on regular basis(Example:execute a script on daily basis) than you can create one Cron job for it.
    Also you can manage this by inserting one new column like last_updated date in eventbooking_clients table and fetch only required users.

    Thread Starter iamdanieljs

    (@iamdanieljs)

    Hi Bhavesh Patel
    Thanks for your answer – Do you think a script like this already exist? I have a little knowledge in php and mysql ?? Sorry…
    Thanks for your time so far!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @go4glory I’ve deleted your offer to login to your user’s site. I’m am 100% sure you mean well but please never ask for credentials on these forums.

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.

    If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.

    Please be aware that repeatedly asking for credentials could result in being banned from these forums.

    https://codex.www.ads-software.com/Forum_Welcome#The_Bad_Stuff

    Hello Jan Dembowski,
    Your are right. My intention was not bad and thanks for understanding it.
    Actually i don’t know about this rule. And surely this will not happen again.
    Thanks Jan Dembowski.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Import users from non-wordpress database’ is closed to new replies.