When a user is authorized on the site, a session is created for him, in which, among other things, his login is saved.
If the user changes the username by the administrator, the user needs to re-create the session (log off and log back in) for the changes to be visible to him.
The question is: how, when changing the login in the database, immediately update the data in the session file, knowing the ID of this session?
I understand that knowing the ID you can open the session file, iterate over it and replacing the data - save again, but can there be a more correct option?