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
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,10 @@ class UserCurrent extends UserAbstract ...@@ -44,7 +44,10 @@ class UserCurrent extends UserAbstract
if ($this->getIdentity()) { if ($this->getIdentity()) {
if ($userProfileSelectable) { 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); $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