• Phillip Dews

    (@phillipdewsblogger)


    Hello fellow developers out there! I have built a custom social network in PHP and MySQLi from the ground up at a site called Birdbook.
    I have also set up a blog section and installed WordPress on this all complete with it’s own separate database from my social network one!
    My question is this. Is it possible for a person to be automatically signed up on the WordPress blog side when they sign up for an account on my social site?
    Even better is there a piece of script I could use or even a tutorial out there?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s possible. I’m unaware of any resources to use for reference, though this has been done before. The root of the task is for your account registration script to assemble the appropriate data and then call wp_insert_user().

    If your code has not loaded the WP environment, it’ll need to require once wp-load.php in order to use that function. Note that doing so renders your code non-portable, where wp-load.php resides on your server should be considered unique and will not reliably work on any other installation.

    Also, loading the entire WP environment just to insert a table row is very inefficient, perhaps not that important for the frequency of new registrants. It’s probably better to directly connect to the WP DB and simply insert the data row. The problem with doing that is properly creating the password hash, but it is more of a research problem than any technical problem.

    Thread Starter Phillip Dews

    (@phillipdewsblogger)

    Thats what I thought! In a way it is probable a lot more easier to build a whole new blogging system from scratch independant from my wordpress site!
    Thanks BCWORKz for taking the time to leave me a comment! will let you know what I decide!
    Best
    – Phillip

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatic Sign Up’ is closed to new replies.