mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: missing team variable and added mfa templates to config
This commit is contained in:
1 parent
917511d87c
commit
83c5477c79
2 files changed
+20
-10
No files matched your search
@@ -6,10 +6,12 @@ return [
|
||||
'magicSession',
|
||||
'recovery',
|
||||
'invitation',
|
||||
'mfaChallenge'
|
||||
],
|
||||
'sms' => [
|
||||
'verification',
|
||||
'login',
|
||||
'invitation'
|
||||
'invitation',
|
||||
'mfaChallenge'
|
||||
]
|
||||
];
|
||||
@@ -1192,14 +1192,16 @@ App::post('/v1/account/tokens/magic-url')
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
/* {{user}}, {{redirect}} and {{project}} are required in default and custom templates */
|
||||
// {{user}}, {{redirect}} and {{project}} are required in default and custom templates
|
||||
'user' => $user->getAttribute('name'),
|
||||
'project' => $project->getAttribute('name'),
|
||||
'redirect' => $url,
|
||||
'agentDevice' => $agentDevice['deviceBrand'] ?? $agentDevice['deviceBrand'] ?? 'UNKNOWN',
|
||||
'agentClient' => $agentClient['clientName'] ?? 'UNKNOWN',
|
||||
'agentOs' => $agentOs['osName'] ?? 'UNKNOWN',
|
||||
'phrase' => !empty($phrase) ? $phrase : ''
|
||||
'phrase' => !empty($phrase) ? $phrase : '',
|
||||
// TODO: remove unnecessary team variable from this email
|
||||
'team' => '',
|
||||
];
|
||||
|
||||
$queueForMails
|
||||
@@ -1419,14 +1421,16 @@ App::post('/v1/account/tokens/email')
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
/* {{user}}, {{project}} and {{otp}} are required in the templates */
|
||||
// {{user}}, {{project}} and {{otp}} are required in the templates
|
||||
'user' => $user->getAttribute('name'),
|
||||
'project' => $project->getAttribute('name'),
|
||||
'otp' => $tokenSecret,
|
||||
'agentDevice' => $agentDevice['deviceBrand'] ?? $agentDevice['deviceBrand'] ?? 'UNKNOWN',
|
||||
'agentClient' => $agentClient['clientName'] ?? 'UNKNOWN',
|
||||
'agentOs' => $agentOs['osName'] ?? 'UNKNOWN',
|
||||
'phrase' => !empty($phrase) ? $phrase : ''
|
||||
'phrase' => !empty($phrase) ? $phrase : '',
|
||||
// TODO: remove unnecessary team variable from this email
|
||||
'team' => '',
|
||||
];
|
||||
|
||||
$queueForMails
|
||||
@@ -2884,10 +2888,12 @@ App::post('/v1/account/recovery')
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
/* {{user}}, {{redirect}} and {{project}} are required in default and custom templates */
|
||||
// {{user}}, {{redirect}} and {{project}} are required in default and custom templates
|
||||
'user' => $profile->getAttribute('name'),
|
||||
'redirect' => $url,
|
||||
'project' => $projectName
|
||||
'project' => $projectName,
|
||||
// TODO: remove unnecessary team variable from this email
|
||||
'team' => ''
|
||||
];
|
||||
|
||||
$queueForMails
|
||||
@@ -3130,10 +3136,12 @@ App::post('/v1/account/verification')
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
/* {{user}}, {{redirect}} and {{project}} are required in default and custom templates */
|
||||
// {{user}}, {{redirect}} and {{project}} are required in default and custom templates
|
||||
'user' => $user->getAttribute('name'),
|
||||
'redirect' => $url,
|
||||
'project' => $projectName
|
||||
'project' => $projectName,
|
||||
// TODO: remove unnecessary team variable from this email
|
||||
'team' => '',
|
||||
];
|
||||
|
||||
$queueForMails
|
||||
@@ -3778,7 +3786,7 @@ App::post('/v1/account/mfa/challenge')
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
/* {{user}}, {{project}} and {{otp}} are required in the templates */
|
||||
// {{user}}, {{project}} and {{otp}} are required in the templates
|
||||
'user' => $user->getAttribute('name'),
|
||||
'project' => $project->getAttribute('name'),
|
||||
'otp' => $code,
|
||||
|
||||
Reference in new issue
Block a user