• Resolved pearlybay

    (@pearlybay)


    I’ve been trying to set my stand-alone WordPress to use a pre-existing custom user table (as to not force my staff to have two separate passwords for their tools).

    I’ve tried it two ways:

    1) by adding these lines to wp-config:

    // define(‘CUSTOM_USER_TABLE’, ‘staff’);
    // define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

    2) by changing the table name directly to wp-settings.

    Both of these lead to the same result (obviously, when looking at how the user table is defined in wp-settings). For the main part, it works: it fetches users and information from the right place.

    However I keep having problems when users try to change passwords in their profile.

    Upon password change WordPress keeps prompting users to “ERROR: Incorrect password” and says their session is not valid. When the old password is given for re-login, it reverts back to profile update page and claims that profile updated.

    Regular profile updates seem to work fine, but password change doesn’t.

    The two tables aren’t identical. However, the password change bugs even when I create an exact duplicate table of wp_users.

    Where to go next?

    Also, I’m buffed about some of the variables in wordpress user profile. Where does it hide such variables as firstname, lastname, AIM? They are not in my wp_users table, nor wp_usermeta.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pearlybay

    (@pearlybay)

    Okay I found the additional user data in wp_usermeta. I had thought it had recorded changes to user data, now I realize it holds the actual data.

    Still lost with the password change.

    Thread Starter pearlybay

    (@pearlybay)

    Updating the situation…

    So now I got the exact replicant table to work. I don’t know how exactly, but it works. I think the reason may have been that my OLD password was scrambled with mysql’s own password command instead of md5, although I can’t really remember using it for the replicant table and I really can’t think of any reason why it would matter…

    However, the original table still gives the same error message about invalid session (the account is not in English so I don’t know what it actually says, but basically it says “your session has gone old” and I assume it means invalid session).

    Will update once I find out something more, will start looking through the ′staff′ table now.

    Thread Starter pearlybay

    (@pearlybay)

    Fine! Now it works!

    I’m guessing the problem with my old users table was that it allowed null for the col user_registered. And because it allowed null for registration (and presumably was null, although I thought I had changed it to now()) then it would appear that the users had never been logged in…

    Anyways. Problem solved! Hope it helps someone who may have the same problem in the future as I wasn’t able to find help in the previous topics.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom user table & password change – doesn’t happen’ is closed to new replies.