mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-30 21:00:13 +02:00
Update accounts by ID instead of email after confirming email address
This commit is contained in:
@@ -482,7 +482,7 @@ final class Auth extends UserManager {
|
||||
|
||||
try {
|
||||
$confirmationData = $this->db->selectRow(
|
||||
'SELECT id, email, token, expires FROM ' . $this->dbTablePrefix . 'users_confirmations WHERE selector = ?',
|
||||
'SELECT id, user_id, email, token, expires FROM ' . $this->dbTablePrefix . 'users_confirmations WHERE selector = ?',
|
||||
[ $selector ]
|
||||
);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ final class Auth extends UserManager {
|
||||
$this->db->update(
|
||||
$this->dbTablePrefix . 'users',
|
||||
[ 'verified' => 1 ],
|
||||
[ 'email' => $confirmationData['email'] ]
|
||||
[ 'id' => $confirmationData['user_id'] ]
|
||||
);
|
||||
}
|
||||
catch (Error $e) {
|
||||
|
Reference in New Issue
Block a user