mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
requested changes
This commit is contained in:
@@ -698,6 +698,7 @@ App::post('/v1/account/sessions/magic-url')
|
||||
|
||||
Authorization::reset();
|
||||
$mails->setParam('event', 'users.create');
|
||||
$audits->setParam('event', 'users.create');
|
||||
}
|
||||
|
||||
$loginSecret = Auth::tokenGenerator();
|
||||
@@ -740,7 +741,6 @@ App::post('/v1/account/sessions/magic-url')
|
||||
$url = Template::unParseURL($url);
|
||||
|
||||
$mails
|
||||
->setParam('event', ($userAdded ?? false) ? 'users.create' : '')
|
||||
->setParam('from', $project->getId())
|
||||
->setParam('recipient', $user->getAttribute('email'))
|
||||
->setParam('url', $url)
|
||||
@@ -763,7 +763,6 @@ App::post('/v1/account/sessions/magic-url')
|
||||
|
||||
$audits
|
||||
->setParam('userId', $user->getId())
|
||||
->setParam('event', ($userAdded ?? false) ? 'users.create' : '')
|
||||
->setParam('resource', 'users/'.$user->getId())
|
||||
;
|
||||
|
||||
|
||||
@@ -141,6 +141,12 @@ App::init(function ($utopia, $request, $response, $project, $user) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'magic-url':
|
||||
if($project->getAttribute('usersAuthMagicURL', true) === false) {
|
||||
throw new Exception('Magic URL authentication is disabled for this project', 501);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'anonymous':
|
||||
if($project->getAttribute('usersAuthAnonymous', true) === false) {
|
||||
throw new Exception('Anonymous authentication is disabled for this project', 501);
|
||||
|
||||
Reference in New Issue
Block a user