Fixed bug 3199: SUing to myself?
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 19 Oct 2006 08:19:20 +0000 (08:19 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 19 Oct 2006 08:19:20 +0000 (08:19 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-0@1766 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/beuser/mod/index.php

index 2d87a83..0705b72 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-10-17  Dmitry Dulepov  <dmitry@typo3.org>
+
+       * Fixed bug 3199: SUing to myself?
+
 2006-10-17  Ernesto Baschny  <ernst@cron-it.de>
 
        * Fix: no more "ERR" or "Unpacking the language pack failed" in the translation handling with curl enabled.
index f2d35b3..53e8f99 100755 (executable)
@@ -1352,11 +1352,12 @@ class SC_mod_tools_be_user_index {
                        while(list(,$dat)=each($comparation))   {
                                $allCells = array();
 
+                               $curUid = $GLOBALS['BE_USER']->user['uid'];
                                $uListArr=array();
                                reset($dat['users']);
                                while(list(,$uDat)=each($dat['users'])) {
                                        $uItem = '<tr><td width="130">'.t3lib_iconWorks::getIconImage('be_users',$uDat,$GLOBALS['BACK_PATH'],'align="top" title="'.$uDat['uid'].'"').$this->linkuser($uDat['username'],$uDat).'&nbsp;&nbsp;</td><td nowrap="nowrap">'.$this->elementLinks('be_users',$uDat);
-                                       if (!$uDat['disable'] && ($uDat['starttime'] == 0 || $uDat['starttime'] < time()) && ($uDat['endtime'] == 0 || $uDat['endtime'] > time()))      {
+                                       if ($curUid != $uDat['uid'] && !$uDat['disable'] && ($uDat['starttime'] == 0 || $uDat['starttime'] < time()) && ($uDat['endtime'] == 0 || $uDat['endtime'] > time()))   {
                                                $uItem .= '<a href="'.t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'])).'" target="_top"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/su.gif').' border="0" align="top" title="'.htmlspecialchars('Switch user to: '.$uDat['username']).' [change-to mode]" alt="" /></a>'.
                                                        '<a href="'.t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'], 'switchBackUser' => 1)).'" target="_top"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/su_back.gif').' border="0" align="top" title="'.htmlspecialchars('Switch user to: '.$uDat['username']).' [switch-back mode]" alt="" /></a>';
                                        }