From 502ad413c86d08e6ff6871156af1628d3d9cfa0b Mon Sep 17 00:00:00 2001
From: Bertrand Gauthier <bertrand.gauthier@unicaen.fr>
Date: Wed, 21 May 2014 07:50:50 +0000
Subject: [PATCH] =?UTF-8?q?Aide=20vue=20UserCurrent=20:=20correction=20bug?=
 =?UTF-8?q?=20si=20aucun=20utilisateur=20connect=C3=A9).?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/UnicaenAuth/View/Helper/UserCurrent.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/UnicaenAuth/View/Helper/UserCurrent.php b/src/UnicaenAuth/View/Helper/UserCurrent.php
index 6b495ff..c04638c 100644
--- a/src/UnicaenAuth/View/Helper/UserCurrent.php
+++ b/src/UnicaenAuth/View/Helper/UserCurrent.php
@@ -42,11 +42,11 @@ class UserCurrent extends UserAbstract
         $status                = $userStatusHelper(false);
         $userProfileSelectable = true;
         
-        if ($userProfileSelectable) {
-            $status .= sprintf(", <small>%s</small>", $this->getUserContext()->getSelectedIdentityRole());
-        }
-        
         if ($this->getIdentity()) {
+            if ($userProfileSelectable) {
+                $status .= sprintf(", <small>%s</small>", $this->getUserContext()->getSelectedIdentityRole());
+            }
+        
             $userProfileHelper = $this->getView()->plugin('userProfile'); /* @var $userProfileHelper \UnicaenAuth\View\Helper\UserProfile */
             $userProfileHelper->setUserProfileSelectable($userProfileSelectable);
             
-- 
GitLab