File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 2020use Illuminate \Support \Facades \Password ;
2121use ReflectionException ;
2222
23- /**
24- * @author Eduard Lupacescu <[email protected] > 25- */
2623class AuthService extends RestifyService
2724{
2825 public function login (Request $ request )
@@ -46,22 +43,12 @@ public function forgotPassword(Request $request)
4643 return ForgotPasswordService::make ($ request );
4744 }
4845
49- /*
50- * @param $id
51- * @param null $hash
52- * @return Builder|Builder[]|\Illuminate\Database\Eloquent\Collection|Model|null
53- * @throws AuthorizationException
54- * @throws EntityNotFoundException
55- * @throws PassportUserException
56- */
5746 public function verify ($ id , $ hash = null )
5847 {
59- /**
60- * @var Authenticatable
61- */
48+ /** * @var Authenticatable */
6249 $ user = $ this ->userQuery ()->query ()->find ($ id );
6350
64- if ($ user instanceof Sanctumable && ! hash_equals ((string ) $ hash , sha1 ($ user ->getEmailForVerification ()))) {
51+ if ($ user instanceof Sanctumable && ! hash_equals ((string )$ hash , sha1 ($ user ->getEmailForVerification ()))) {
6552 throw new AuthorizationException ('Invalid hash ' );
6653 }
6754
You can’t perform that action at this time.
0 commit comments