Add sending an email to reset the passphrase when trying to re-register
This commit is contained in:
parent
987b2b4e48
commit
482061f54d
1 changed files with 13 additions and 0 deletions
|
@ -476,6 +476,19 @@ class Register extends Page
|
|||
&& 1 === $this->c->config->b_regs_verify
|
||||
) {
|
||||
$isSent = true;
|
||||
$flood = \time() - $userInDB->last_email_sent;
|
||||
|
||||
// отправка письма на сброс кодовой фразы
|
||||
// костыль
|
||||
if ($flood >= $this->c->FLOOD_INTERVAL) {
|
||||
$_POST = [
|
||||
'token' => $this->c->Csrf->create('Forget'),
|
||||
'email' => $email,
|
||||
'submit' => 'From dupe registration',
|
||||
];
|
||||
|
||||
$this->c->Auth->forget([], 'POST');
|
||||
}
|
||||
|
||||
// письмо активации аккаунта отправлено
|
||||
if ($isSent) {
|
||||
|
|
Loading…
Add table
Reference in a new issue