Skip to content

Commit

Permalink
Model was undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
riekelt committed Dec 10, 2019
1 parent e4dcfc5 commit fc567e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Services/ImpersonateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public function findUserById($id, $guardName = null)
$userProvider = $this->app['auth']->createUserProvider($providerName);

if (!($modelInstance = $userProvider->retrieveById($id))) {
$model = $this->app['config']->get("auth.providers.$providerName.model");

throw (new ModelNotFoundException())->setModel(
$model,
$id
Expand Down

0 comments on commit fc567e0

Please sign in to comment.