Forums

WordPress login functionality with parent site (4 posts)

  1. esomarrw
    Member
    Posted 2 years ago #

    I've asked this question a couple of times but although i get replies i never seem to get a final yes or no answer.

    My organisation want to use wordpress as a blog within our main site. On the main site, as a user, you need to login to do anything apart from simply read copy. So on the wordpress site we would need users to login in order to leave comments. The functionality needed would be that a user only has to login once (on main site or wordpress blog) and the login would be valid on both sites for the duration of their visit.

    Is this possible with wordpress?

    Look forward to hopefully getting an answer.

    Thanks in advance

    RW

  2. duck__boy
    Member
    Posted 2 years ago #

    Not quite sure I follow here - You already have a site, and you then want to add WP functionality to that site?

    If thats the case, then you would have to log in twice, as they would use different database tables. You probably could write some function that called the other login function and supplied it the credentials, but that would be difficult and long winded.

  3. esomarrw
    Member
    Posted 2 years ago #

    Yeah we have a site. We want a blog for it and would like to use wordpress. So we're planning on hosting the blog on the main site.

    I was hoping it might be possible to disable the wordpress database table and and use the one from the main site.

  4. duck__boy
    Member
    Posted 2 years ago #

    WordPress uses variables called 'table_prefix' and 'base_prefix' to identify how the DB table name should start (usually just wp_), and then calls the table 'wp_user' and 'wp_usermeta'.

    WP calls tables for DB queries using the global variable $wpdb ($wpdb-users for example would print wp_users if you use the standard prefix), so in theory you could change those variable names somehow to the match your current tables.

    I'd have no idea how to do that thouhgh, although I guess you could hack one of the core files (this would change back on upgrade though), and you'd need to make sure the column's matched, else the data will not be picked up.

Topic Closed

This topic has been closed to new replies.

About this Topic