You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/web/login/otp.php
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,13 @@ function finish_2fa_success($msg = '') {
151
151
}
152
152
153
153
$clientuser = $app->db->queryOneRecord('SELECT email FROM sys_user u LEFT JOIN client c ON (u.client_id=c.client_id) WHERE u.userid = ?', $_SESSION['s_pending']['user']['userid']);
154
-
$email_to = $clientuser['email'];
154
+
if (!empty($clientuser['email'])) {
155
+
$email_to = $clientuser['email'];
156
+
}
157
+
else {
158
+
// Admin users are not related to a client, thus use the globally configured email address.
0 commit comments