فهرست منبع

Update forget() method

Visman 4 سال پیش
والد
کامیت
4d2cf3f7ff
2فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 2 4
      app/Models/Pages/Auth.php
  2. 1 1
      app/Models/Pages/Register.php

+ 2 - 4
app/Models/Pages/Auth.php

@@ -208,7 +208,7 @@ class Auth extends Page
     /**
     /**
      * Запрос на смену кодовой фразы
      * Запрос на смену кодовой фразы
      */
      */
-    public function forget(array $args, string $method): Page
+    public function forget(array $args, string $method, string $email = ''): Page
     {
     {
         $this->c->Lang->load('validator');
         $this->c->Lang->load('validator');
         $this->c->Lang->load('auth');
         $this->c->Lang->load('auth');
@@ -315,9 +315,7 @@ class Auth extends Page
         $this->onlinePos  = 'passphrase_reset';
         $this->onlinePos  = 'passphrase_reset';
         $this->robots     = 'noindex';
         $this->robots     = 'noindex';
         $this->titles     = __('Passphrase reset');
         $this->titles     = __('Passphrase reset');
-
-        $email            = $v ? $v->email : ($args['_email'] ?? '');
-        $this->form       = $this->formForget($email);
+        $this->form       = $this->formForget($v ? $v->email : $email);
 
 
         return $this;
         return $this;
     }
     }

+ 1 - 1
app/Models/Pages/Register.php

@@ -265,7 +265,7 @@ class Register extends Page
                 $auth         = $this->c->Auth;
                 $auth         = $this->c->Auth;
                 $auth->fIswev = ['w', __('Error welcom mail', $this->c->config->o_admin_email)];
                 $auth->fIswev = ['w', __('Error welcom mail', $this->c->config->o_admin_email)];
 
 
-                return $auth->forget(['_email' => $v->email], 'GET');
+                return $auth->forget([], 'GET', $v->email);
             }
             }
         // форма логина
         // форма логина
         } else {
         } else {