From 45fc2f51b42052845c3dc43a73c0893135713269 Mon Sep 17 00:00:00 2001 From: Maksym Date: Fri, 13 Jan 2023 18:56:41 +0100 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D1=81=D1=81=D1=82=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0=D1=80?= =?UTF-8?q?=D0=BE=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repass.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/repass.php b/repass.php index a89768c1..216c9bc3 100644 --- a/repass.php +++ b/repass.php @@ -21,6 +21,7 @@ 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 { @@ -58,9 +59,11 @@ if (isset($_POST['relogin'])) { $txt .= 'Отвечать на данное письмо не нужно.

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