Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
ac52b7c4
Commit
ac52b7c4
authored
Sep 18, 2014
by
David Surville
Browse files
cas où aucun rôle n'est sélectionné, on affiche le rôle "user"
parent
73fe6e49
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/View/Helper/UserCurrent.php
View file @
ac52b7c4
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment