0

I have a site we wanted the login username to be the user's e-mail address. The user_login column contains the e-mail address. No problem. I created a custom function so that when the user updates their e-mail address on their profile page, the user_login column is also updated. Works like a charm.

The problem is, when you change the user_login value, the WordPress session gets terminated. Assuming this is a cookie issue.

Is there any way to stop the user from getting kicked out?

1 Answer 1

0

I can be wrong, but I almost sure is not an issue: the cookie is based on user login, changing it the cookie is not valid anymore.

If I'm right, is not possible kick out this behaviour, but if you want you can auto re-login the user after the update using wp_signon function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.