I have a form where I can change things like username
, password
, morada
, etc.
On the site I also use a session (login) for each user, which is defined by username
.
The problem is that by changing the form value of username
it no longer equals the username
of the current session, so that the login stops working.
Is there something I can use to detect the change from username
to redirect to the login page again and display an alert saying "Username changed, sign in again"?