Fix Undefined variable $user

This commit is contained in:
Visman 2023-08-01 17:47:32 +07:00
parent 30083d0c35
commit 214bbbfaa0
2 changed files with 2 additions and 2 deletions

View file

@ -417,7 +417,7 @@ class Auth extends Page
|| ! \hash_equals($user->activate_string, $args['key'])
) {
$this->c->Log->warning('Passphrase reset: confirmation, fail', [
'user' => $user instanceof User ? $user->fLog() : $this->user->fLog(),
'user' => isset($user) && $user instanceof User ? $user->fLog() : $this->user->fLog(),
'args' => $args,
]);

View file

@ -514,7 +514,7 @@ class Register extends Page
|| ! \hash_equals($user->activate_string, $args['key'])
) {
$this->c->Log->warning('Account activation: fail', [
'user' => $user instanceof User ? $user->fLog() : $this->user->fLog(),
'user' => isset($user) && $user instanceof User ? $user->fLog() : $this->user->fLog(),
'args' => $args,
]);