Improved error message when no supported user provider is found
This commit is contained in:
parent
d90a503160
commit
6b2db6dc30
@ -91,7 +91,7 @@ class ChainUserProvider implements UserProviderInterface
|
||||
$e->setUsername($user->getUsername());
|
||||
throw $e;
|
||||
} else {
|
||||
throw new UnsupportedUserException(sprintf('The account "%s" is not supported.', \get_class($user)));
|
||||
throw new UnsupportedUserException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', \get_class($user)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ class ContextListener implements ListenerInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
throw new \RuntimeException(sprintf('There is no user provider for user "%s".', $userClass));
|
||||
throw new \RuntimeException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $userClass));
|
||||
}
|
||||
|
||||
private function safelyUnserialize($serializedToken)
|
||||
|
@ -239,7 +239,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnsupportedUserException(sprintf('There is no user provider that supports class "%s".', $class));
|
||||
throw new UnsupportedUserException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user