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
056bc64e
Commit
056bc64e
authored
May 27, 2013
by
Bertrand Gauthier
Browse files
Petit embellissement.
parent
cba9f6ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/View/Helper/UserCurrent.php
View file @
056bc64e
...
...
@@ -44,31 +44,32 @@ class UserCurrent extends UserAbstract
public
function
__toString
()
{
try
{
$id
=
'user-current-info'
;
$status
=
$this
->
getView
()
->
userStatus
(
false
);
if
(
$this
->
getIdentity
())
{
$id
=
'user-current-info'
;
$status
=
$this
->
getView
()
->
userStatus
(
false
);
$content
=
$this
->
getView
()
->
userProfile
()
.
$this
->
getView
()
->
userInfo
(
$this
->
getAffectationFineSiDispo
());
$content
=
preg_replace
(
'/\r\n|\n|\r/'
,
''
,
$content
);
$out
=
<<<EOS
}
else
{
$content
=
"Aucun"
;
}
$content
=
preg_replace
(
'/\r\n|\n|\r/'
,
''
,
$content
);
$out
=
<<<EOS
<a class="navbar-link" id="$id" title="Utilisateur connecté" data-placement="bottom" data-toggle="popover" data-content="$content" href="#">$status</a>
EOS;
$out
.
=
<<<EOS
$out
.
=
<<<EOS
<script type="text/javascript">
$(function() {
$("#$id").popover({ html: true, container: 'body' });
});
</script>
EOS;
}
else
{
$out
=
""
.
$this
->
getView
()
->
userStatus
(
false
);
}
}
catch
(
\
Exception
$e
)
{
var_dump
(
$e
);
$out
=
'<p>'
.
$e
->
getMessage
()
.
'</p><p>'
.
$e
->
getTraceAsString
()
.
'</p>'
;
}
return
$out
;
}
...
...
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