I want to change the username of the currently logged-in user (programmatically) without logging the user out after doing that.
Here is the method code that I use
public void ChangeUsername(int userId, string newEmailAddress)
{
UserController.ChangeUsername(userId, newEmailAddress);
}
Every time I change the username for any user, the user had to log in again after the update is done. How to prevent this behavior?