• I’ve got a website with its own user database. I’m adding a wordpress blog to my existing site, and would like to use the name and password information from that other database in conjunction with the comments. So I’ve disabled wordpress registrations. I want it to be set up so that if a visitor is not logged in to the existing website, they can enter a name and email address to submit a comment, but if they are logged in to the existing website, the name that will be associated with their comment is the one retrieved from my other database.

    What’s the best way to do this? I can pull the values for name and email from cookies, and I’ve written code to do this, but I wonder if there is a more robust way to do this.

Viewing 7 replies - 1 through 7 (of 7 total)
  • So, One of the databases was running for a non-wordpress script? and Now you want to copy all the login values and everything to wordpress database?

    Do you want to keep the databases seperate or bring over the logins to your wordpress database?

    Whichever you want to do, what are your reasons for choosing one over the other (I can think of a few pros and cons for both, or situations where either may be applicable)

    esomarrw

    (@esomarrw)

    Is there a solid answer to the initial question?

    I would like to know whether it’s possible to bring over logins to our wordpress database in order allow 1 set of login details for the main site and comments on the wordpress site.

    Any feedback would be appreciated.

    Cheers

    A

    Anyone?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Possible? Yes.

    Easy? No.

    You’ll probably want to hire someone who knows BOTH WordPress and whatever your setup already is. https://jobs.wordpress.net would be a good start.

    Solution would be to chose one the two login\registration system and implement hidden call to the other one.
    Example: you keeps as pubblic your site registration, login and logout procedure, but on registration you add a script to pull data on the wordpress database, logging on the website should log you also on the blog, same for logout.
    Check the user tables of both to understand which one would fit better you need and just reimplement on it the function of the other.
    Good luck ??

    Common to both processess, connect to both the databases.

    For user registration…
    Consider using $_SESSION variables in your original website login page and the session_start() command with the same $_SESSION variables in your WP page. You can alos put these in you wp-config file. Finally, perform a MySQL INSERT INTO query for the wp_users table keeping in mind your original table should match the wp_users table structure.

    For your login page…
    Do the same, but only read the wp_user table using the SELECT command.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using a non-wordpress database to manage comments’ is closed to new replies.