• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Username Synchronisation

MattW19

Baby Bird
XenWord Professional
As mentioned in the other section - I've got a number of users that have changed usernames on the forum, but their old one is still shown when I pull in their info on the Wordpress side.

I was able to build a query that did the update manually -
Code:
UPDATE wordpress.wp_users JOIN xenforo.xf_user ON wordpress.wp_users.ID = xenforo.xf_user.user_id SET wp_users.user_login = xf_user.username

But ideally the login script could just do a quick check for equivalence between the username that is associated with the id in the Wordpress database and the one that comes in from the XenForo hook, and then update to match the XenForo side if they aren't the same.

Obviously it's not that common that names change (it's an area where forums have radically different policies from my experience), but presumably there's a query done anyway that pulls in both sets of user data?

I'm happy to just run that query when I need to for now, so not a high priority.
 
Top