From 35c0b6825f55ccd6b9c7ed1e2224a13595878d02 Mon Sep 17 00:00:00 2001 From: DarksLight2 Date: Fri, 13 Jan 2023 21:41:44 +0000 Subject: [PATCH] revert 45fc2f51b42052845c3dc43a73c0893135713269 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit revert Восстановление пароля --- repass.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/repass.php b/repass.php index 216c9bc3..a89768c1 100644 --- a/repass.php +++ b/repass.php @@ -21,7 +21,6 @@ if (isset($_POST['relogin'])) { $u = User::start(); $usr = Db::getRow('select * from users where login =?', [$_POST['relogin']]); - if (!isset($usr['id'])) { $error = 'Логин "' . htmlspecialchars($_POST['relogin'], null) . '" не найден в базе.'; } else { @@ -59,11 +58,9 @@ if (isset($_POST['relogin'])) { $txt .= 'Отвечать на данное письмо не нужно.

'; $txt .= 'С уважением,
'; $txt .= 'Администрация Бойцовского Клуба'; + $mail = Core\Mail::send($usr['mail'], $txt, $title); - $mail = mail($usr['mail'], $title, $txt); - //$mail = Core\Mail::send($usr['mail'], $txt, $title); - - if ($mail) { + if ($mail === 1) { Db::sql( 'update users set securetime = unix_timestamp(), allLock = unix_timestamp(), pass = ? where id = ?', [password_hash($newPassword, PASSWORD_DEFAULT), $usr['id']]