почта не уходила

This commit is contained in:
Ivor Barhansky 2023-01-12 05:38:48 +02:00
parent e8252b8d4d
commit d0fb296691

View File

@ -39,7 +39,6 @@ if (isset($_POST['relogin'])) {
} elseif ( } elseif (
str_replace('0', '', date('d.m.Y', strtotime($_POST['redate']))) == str_replace('0', '', $usr['bithday']) str_replace('0', '', date('d.m.Y', strtotime($_POST['redate']))) == str_replace('0', '', $usr['bithday'])
) { ) {
$error = '<br><br><br>Пароль от персонажа &quot;' . $usr['login'] . '&quot; был успешно выслан на E-mail указанный при регистрации! <br><br><br>';
$re = Db::getValue( $re = Db::getValue(
'select count(*) from logs_auth where uid = ? and type = 0 and depass != ?', 'select count(*) from logs_auth where uid = ? and type = 0 and depass != ?',
[$usr['id'], ''] [$usr['id'], '']
@ -48,7 +47,7 @@ if (isset($_POST['relogin'])) {
if ($usr['securetime'] < Config::get('securetime')) { if ($usr['securetime'] < Config::get('securetime')) {
unset($re); unset($re);
} }
if (!isset($re)) { if (!empty($re)) {
$newPassword = PassGen::new(); $newPassword = PassGen::new();
$title = 'Восстановление пароля от "' . $usr['login'] . '".'; $title = 'Восстановление пароля от "' . $usr['login'] . '".';
$txt = 'Добрый день.<br>'; $txt = 'Добрый день.<br>';
@ -75,6 +74,7 @@ if (isset($_POST['relogin'])) {
$error = $mail; $error = $mail;
} }
unset($mail); unset($mail);
$error = '<br><br><br>Пароль от персонажа &quot;' . $usr['login'] . '&quot; был успешно выслан на E-mail указанный при регистрации! <br><br><br>';
} }
} else { } else {
$error = 'Неверно указан день рождения.'; $error = 'Неверно указан день рождения.';