mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-03 22:57:27 +02:00
Reflect changed email address in same session immediately
This commit is contained in:
@@ -511,6 +511,15 @@ final class Auth extends UserManager {
|
||||
throw new DatabaseError();
|
||||
}
|
||||
|
||||
// if the user is currently signed in
|
||||
if ($this->isLoggedIn()) {
|
||||
// if the user has just confirmed an email address for their own account
|
||||
if ($this->getUserId() === $confirmationData['user_id']) {
|
||||
// immediately update the email address in the current session as well
|
||||
$this->setEmail($confirmationData['email']);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$this->db->delete(
|
||||
$this->dbTablePrefix . 'users_confirmations',
|
||||
|
Reference in New Issue
Block a user