Skip to content
Snippets Groups Projects
Unverified Commit f2f77b2b authored by Helmo's avatar Helmo
Browse files

Fix indend and add comment

parent 0d12df1f
No related branches found
No related tags found
No related merge requests found
Pipeline #11335 passed
......@@ -129,6 +129,7 @@ if($_SESSION['otp']['type'] == 'email') {
// Send code via email.
if (!isset($_SESSION['otp']['sent']) || $_GET['action'] == 'resend') {
// Handle otp_email_override.
$sys_user = $app->db->queryOneRecord('SELECT otp_data FROM sys_user WHERE userid = ?', $_SESSION['s_pending']['user']['userid']);
$data = json_decode($sys_user['otp_data'], TRUE);
......@@ -136,14 +137,14 @@ if($_SESSION['otp']['type'] == 'email') {
$email_to = $data['otp_email_override'];
}
else {
$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']);
if (!empty($clientuser['email'])) {
$email_to = $clientuser['email'];
}
else {
// Admin users are not related to a client, thus use the globally configured email address.
$email_to = $mail_config['admin_mail'];
}
$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']);
if (!empty($clientuser['email'])) {
$email_to = $clientuser['email'];
}
else {
// Admin users are not related to a client, thus use the globally configured email address.
$email_to = $mail_config['admin_mail'];
}
}
$mail_otp_code_retry_timeout = 30;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment