Commit 3c25c0e1 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Possibilité de fournir un fournisseur d'identité null.

parent b7a0327b
......@@ -45,7 +45,8 @@ class UserProfile extends UserAbstract
}
$roles = array();
foreach ($this->getIdentityProvider()->getIdentityRoles() as $role) {
$identityRoles = $this->getIdentityProvider() ? $this->getIdentityProvider()->getIdentityRoles() : array();
foreach ($identityRoles as $role) {
$lib = '';
if ($role instanceof NamedRole) {
$lib = $role->getRoleName();
......@@ -91,7 +92,7 @@ class UserProfile extends UserAbstract
* @param ProviderInterface $identityProvider
* @return self
*/
public function setIdentityProvider(ProviderInterface $identityProvider)
public function setIdentityProvider(ProviderInterface $identityProvider = null)
{
$this->identityProvider = $identityProvider;
return $this;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment