mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-06 08:07: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();
|
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 {
|
try {
|
||||||
$this->db->delete(
|
$this->db->delete(
|
||||||
$this->dbTablePrefix . 'users_confirmations',
|
$this->dbTablePrefix . 'users_confirmations',
|
||||||
|
Reference in New Issue
Block a user