Followup to #7282: Username is now only linked to user setup if the module is accessible
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Sun, 3 Feb 2008 18:37:10 +0000 (18:37 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Sun, 3 Feb 2008 18:37:10 +0000 (18:37 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3040 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/backend.php

index 1649bb8..068b9b2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-03  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Followup to #7282: Username is now only linked to user setup if the module is accessible
+
 2008-02-03  Benjamin Mack  <mack@xnos.org>
 
        * Followup to #7361: Reset button has now a JS confirm question
index ddc3cb5..a358c4c 100644 (file)
@@ -279,8 +279,13 @@ class TYPO3backend {
                        $BE_USER->user['realName'].' ['.$BE_USER->user['username'].']' :
                        '['.$BE_USER->user['username'].']';
 
-               $username   = '"><a href="#" onclick="top.goToModule(\'user_setup\');this.blur();return false;">'
-                                       . $icon.'<span>'.htmlspecialchars($label) . '</span></a>';
+                       // Link to user setup if it's loaded and user has access
+               $link = '';
+               if (t3lib_extMgm::isLoaded('setup') && $BE_USER->check('modules','user_setup')) {
+                       $link = '<a href="#" onclick="top.goToModule(\'user_setup\');this.blur();return false;">';
+               }
+
+               $username = '">'.$link.$icon.'<span>'.htmlspecialchars($label).'</span>'.($link?'</a>':'');
 
                        // superuser mode
                if($BE_USER->user['ses_backuserid']) {
@@ -730,4 +735,4 @@ if(is_array($GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendI
 
 $TYPO3backend->render();
 
-?>
\ No newline at end of file
+?>