Bug #18055 » loginUsername2.diff
typo3/backend.php (working copy) | ||
---|---|---|
* @return string html code snippet displaying the currently logged in user
|
||
*/
|
||
private function getLoggedInUserLabel() {
|
||
$username = '<div id="username" class="toolbar-item no-separator">['.htmlspecialchars($GLOBALS['BE_USER']->user['username']).']</div>';;
|
||
global $BE_USER, $BACK_PATH;
|
||
$icon = '<img'.t3lib_iconWorks::skinImg(
|
||
'',
|
||
$BE_USER->isAdmin() ?
|
||
'gfx/i/be_users_admin.gif' :
|
||
'gfx/i/be_users.gif',
|
||
'width="14" height="14"'
|
||
).' title="" alt=""
|
||
onclick="top.goToModule(\'user_setup\');this.blur();return false;"
|
||
style="cursor:pointer;"
|
||
/>';
|
||
$label = $GLOBALS['BE_USER']->user['realName'] ?
|
||
$BE_USER->user['realName'].' ['.$BE_USER->user['username'].']' :
|
||
'['.$BE_USER->user['username'].']';
|
||
$username = '">'.$icon.'<span>'.htmlspecialchars($label) . '</span>;
|
||
// superuser mode
|
||
if($BE_USER->user['ses_backuserid']) {
|
||
$username = '<div id="username" class="toolbar-item no-separator typo3-red-background">[SU: '.htmlspecialchars($GLOBALS['BE_USER']->user['username']).']</div>';
|
||
$username = ' su-user">SU: '.$icon.'<span>'.htmlspecialchars($label).'</span>';
|
||
}
|
||
return $username;
|
||
return '<div id="username" class="toolbar-item no-separator'.$username.'</div>';
|
||
}
|
||
/**
|
||
... | ... | |
$TYPO3backend->render();
|
||
?>
|
||
?>
|
typo3/css/backend-style.css (working copy) | ||
---|---|---|
/* ----- logged in user ----- */
|
||
#username {
|
||
padding-top: 5px;
|
||
height:13px;
|
||
}
|
||
#username.su-user {
|
||
background:#f7989f;
|
||
padding-left:4px;
|
||
}
|
||
#username img {
|
||
padding:0 4px;
|
||
vertical-align:bottom;
|
||
}
|
||
#username span {
|
||
padding-right:4px;
|
||
}
|
||
#logout-button {
|
||
padding-left: 4px;
|
||
... | ... | |