Skip to content
Snippets Groups Projects
Commit cb16470a authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Correction d'une notice qui aparaissait si on n'tait pas connecté: pas de selectable role

parent 40bb0af6
No related branches found
No related tags found
No related merge requests found
......@@ -335,12 +335,15 @@ class UserContext extends AbstractService implements EventManagerAwareInterface
unset($this->getSessionContainer()->selectedIdentityRole);
}
$role = $this->getSelectableIdentityRoles()[$role];
$selectableIdentityRoles = $this->getSelectableIdentityRoles();
if (isset($selectableIdentityRoles[$role])){
$role = $selectableIdentityRoles[$role];
if ($role instanceof AbstractRole) {
$this->saveUserLastRole($role);
}
$this->triggerUserRoleSelectedEvent(UserRoleSelectedEvent::POST_SELECTION, $role);
}
return $this;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment