|
@@ 119-122 (lines=4) @@
|
| 116 |
|
*/ |
| 117 |
|
public function passre($user_mail) { |
| 118 |
|
$user = $this->get($user_mail, 'mail'); |
| 119 |
|
if (!$user) { |
| 120 |
|
Msg::add(\I18n\Text::module('Users', 'mailnotfound', ['user_mail' => $user_mail]), 'danger'); |
| 121 |
|
return false; |
| 122 |
|
} |
| 123 |
|
$passre = Users\Passre::get([['user_id', $user->id], ['status', 1]]); |
| 124 |
|
if ($passre) { |
| 125 |
|
$passre->status = 2; |
|
@@ 170-173 (lines=4) @@
|
| 167 |
|
$where[] = ['date_create', $lastSuccessLogin->date_create, '>']; |
| 168 |
|
} |
| 169 |
|
$loginHistoryErrorCount = \Users\User\LoginHistory::getCount(['where' => $where]); |
| 170 |
|
if ($loginHistoryErrorCount > 5) { |
| 171 |
|
Msg::add(\I18n\Text::module('Users', 'logintrylimit', ['user_mail' => $user->mail]), 'danger'); |
| 172 |
|
return false; |
| 173 |
|
} |
| 174 |
|
} |
| 175 |
|
if ($user && $this->verifypass($pass, $user->pass) && !$user->blocked) { |
| 176 |
|
$loginHistory = new \Users\User\LoginHistory([ |