Не отрабатывает проверка на незаполненность.
This commit is contained in:
parent
7ed294e4e5
commit
4d99a5bcad
@ -23,7 +23,7 @@ function mail_send($to, $from_user, $from_email, $subject = '(No subject)', $mes
|
|||||||
$login = filter_input(INPUT_POST, 'loginid', FILTER_SANITIZE_SPECIAL_CHARS);
|
$login = filter_input(INPUT_POST, 'loginid', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
if ($login) {
|
if ($login) {
|
||||||
$recovery = db::c()->query('SELECT 1 FROM users_recovery WHERE login = "?s"', $login);
|
$recovery = db::c()->query('SELECT 1 FROM users_recovery WHERE login = "?s"', $login);
|
||||||
if ($recovery->getNumRows()) {
|
if (!empty($recovery->getNumRows())) {
|
||||||
$sql = db::c()->query('SELECT email FROM users WHERE login = "?s"', $login)->fetch_assoc();
|
$sql = db::c()->query('SELECT email FROM users WHERE login = "?s"', $login)->fetch_assoc();
|
||||||
if ($sql) {
|
if ($sql) {
|
||||||
$hash = bin2hex(random_bytes(8));
|
$hash = bin2hex(random_bytes(8));
|
||||||
|
Loading…
Reference in New Issue
Block a user