mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: magic url email verification
This commit is contained in:
@@ -831,7 +831,11 @@ App::put('/v1/account/sessions/magic-url')
|
||||
$dbForProject->deleteDocument('tokens', $token);
|
||||
$dbForProject->deleteCachedDocument('users', $user->getId());
|
||||
|
||||
$user = $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('sessions', $session, Document::SET_TYPE_APPEND));
|
||||
$user
|
||||
->setAttribute('emailVerification', true)
|
||||
->setAttribute('sessions', $session, Document::SET_TYPE_APPEND);
|
||||
|
||||
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
|
||||
|
||||
if (false === $user) {
|
||||
throw new Exception('Failed saving user to DB', 500, Exception::GENERAL_SERVER_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user