Обучение #39

Merged
lopar merged 15 commits from maksym into dev 2023-01-23 11:45:10 +00:00
Showing only changes of commit 35c0b6825f - Show all commits

View File

@ -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 .= 'Отвечать на данное письмо не нужно.<br><br>';
$txt .= 'С уважением,<br>';
$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']]