Skip to content
Snippets Groups Projects
Commit ac52b7c4 authored by David Surville's avatar David Surville
Browse files

cas où aucun rôle n'est sélectionné, on affiche le rôle "user"

parent 73fe6e49
Branches
Tags
No related merge requests found
......@@ -44,7 +44,10 @@ class UserCurrent extends UserAbstract
if ($this->getIdentity()) {
if ($userProfileSelectable) {
$role = $this->getUserContext()->getSelectedIdentityRole();
// DS : cas où aucun rôle n'est sélectionné, on affiche le rôle "user"
$role = (null !== $this->getUserContext()->getSelectedIdentityRole())
? $this->getUserContext()->getSelectedIdentityRole()
: $this->getUserContext()->getIdentityRoles()['user'];
$status .= sprintf(", <small>%s</small>", !method_exists($role, '__toString') ? $role->getRoleId() : $role);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment