Skip to content

Commit 9fff194

Browse files
authored
Merge pull request #21 from emile-yamaji/master
issue#19
2 parents c7c1f7f + 084ea13 commit 9fff194

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Traits/RegistersUsers.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ public function register(Request $request)
4343
*/
4444
public function confirm($id, $confirmation_code)
4545
{
46-
$model = config('auth.providers.users.model');
47-
48-
$user = $model::whereId($id)->whereConfirmationCode($confirmation_code)->firstOrFail();
46+
$model = $this->guard()->getProvider()->createModel();
47+
$user = $model->whereId($id)->whereConfirmationCode($confirmation_code)->firstOrFail();
4948
$user->confirmation_code = null;
5049
$user->confirmed = true;
5150
$user->save();

0 commit comments

Comments
 (0)