Add Core\Test call
This commit is contained in:
parent
e5f677bf61
commit
ee432334ab
3 changed files with 16 additions and 0 deletions
|
@ -53,6 +53,8 @@ class Auth extends Page
|
|||
'password' => 'Passphrase',
|
||||
]);
|
||||
|
||||
$v = $this->c->Test->beforeValidation($v);
|
||||
|
||||
if ($v->validation($_POST, true)) {
|
||||
return $this->c->Redirect->url($v->redirect)->message('Login redirect');
|
||||
}
|
||||
|
@ -186,6 +188,8 @@ class Auth extends Page
|
|||
'email.email' => $tmpUser, // сюда идет возрат данных по найденному пользователю
|
||||
]);
|
||||
|
||||
$v = $this->c->Test->beforeValidation($v);
|
||||
|
||||
if ($v->validation($_POST, true)) {
|
||||
$key = $this->c->Secury->randomPass(32);
|
||||
$hash = $this->c->Secury->hash($tmpUser->id . $key);
|
||||
|
@ -317,6 +321,8 @@ class Auth extends Page
|
|||
'password2.same' => 'Pass not match',
|
||||
]);
|
||||
|
||||
$v = $this->c->Test->beforeValidation($v);
|
||||
|
||||
if ($v->validation($_POST, true)) {
|
||||
$user->password = \password_hash($v->password, \PASSWORD_DEFAULT);
|
||||
$user->email_confirmed = 1;
|
||||
|
|
|
@ -35,6 +35,10 @@ class Post extends Page
|
|||
if ('POST' === $method) {
|
||||
$v = $this->messageValidator($forum, 'NewTopic', $args, false, true);
|
||||
|
||||
if ($this->user->isGuest) {
|
||||
$v = $this->c->Test->beforeValidation($v);
|
||||
}
|
||||
|
||||
if (
|
||||
$v->validation($_POST, $this->user->isGuest) //????
|
||||
&& null === $v->preview
|
||||
|
@ -93,6 +97,10 @@ class Post extends Page
|
|||
if ('POST' === $method) {
|
||||
$v = $this->messageValidator($topic, 'NewReply', $args);
|
||||
|
||||
if ($this->user->isGuest) {
|
||||
$v = $this->c->Test->beforeValidation($v);
|
||||
}
|
||||
|
||||
if (
|
||||
$v->validation($_POST, $this->user->isGuest) //????
|
||||
&& null === $v->preview
|
||||
|
|
|
@ -39,6 +39,8 @@ class Register extends Page
|
|||
'username.login' => 'Login format',
|
||||
]);
|
||||
|
||||
$v = $this->c->Test->beforeValidation($v);
|
||||
|
||||
// завершение регистрации
|
||||
if (
|
||||
$v->validation($_POST, true)
|
||||
|
|
Loading…
Add table
Reference in a new issue