Skip to content

Commit 3ddebfe

Browse files
committed
Extra error when No mail address available to sent an OTP code to
1 parent 7cb697a commit 3ddebfe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/web/login/otp.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,13 @@ function finish_2fa_success($msg = '') {
169169
if (!empty($clientuser['email'])) {
170170
$email_to = $clientuser['email'];
171171
}
172-
else {
172+
elseif(!empty($mail_config['admin_mail'])) {
173173
// Admin users are not related to a client, thus use the globally configured email address.
174174
$email_to = $mail_config['admin_mail'];
175175
}
176+
else {
177+
$app->error('No mail address available to sent an OTP code to.', 'index.php');
178+
}
176179
}
177180

178181
$app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']);

0 commit comments

Comments
 (0)