File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/Http/Controllers/Auth Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 33namespace Binaryk \LaravelRestify \Http \Controllers \Auth ;
44
55use Binaryk \LaravelRestify \Contracts \Sanctumable ;
6- use Binaryk \LaravelRestify \Tests \Fixtures \User \User ;
76use Illuminate \Auth \Access \AuthorizationException ;
87use Illuminate \Auth \Events \Verified ;
8+ use Illuminate \Contracts \Auth \Authenticatable ;
99use Illuminate \Contracts \Auth \MustVerifyEmail ;
1010use Illuminate \Routing \Controller ;
1111
1212class VerifyController extends Controller
1313{
1414 public function __invoke (int $ id , string $ hash )
1515 {
16- $ user = User::query ()->findOrFail ($ id );
16+ /**
17+ * @var Authenticatable $user
18+ */
19+ $ user = config ('restify.auth.user_model ' )::query ()->findOrFail ($ id );
1720
1821 if ($ user instanceof Sanctumable && ! hash_equals ((string ) $ hash , sha1 ($ user ->getEmailForVerification ()))) {
1922 throw new AuthorizationException ('Invalid hash ' );
You can’t perform that action at this time.
0 commit comments