Skip to content

Commit ecb207a

Browse files
committed
refactor: use getIdentity() for improve the code
1 parent 890729d commit ecb207a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/Authentication/Actions/Email2FA.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ public function handle(IncomingRequest $request)
6767
return redirect()->route('auth-action-show')->with('error', lang('Auth.invalidEmail'));
6868
}
6969

70-
/** @var UserIdentityModel $identityModel */
71-
$identityModel = model(UserIdentityModel::class);
72-
73-
$identity = $identityModel->getIdentityByType($user, $this->type);
70+
$identity = $this->getIdentity($user);
7471

7572
if (empty($identity)) {
7673
return redirect()->route('auth-action-show')->with('error', lang('Auth.need2FA'));

0 commit comments

Comments
 (0)