[Vtigercrm-commits] [vtiger-commits] r6556 - /vtigercrm/trunk/modules/Users/User.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sat May 27 16:48:31 EDT 2006


Author: saraj
Date: Sat May 27 14:48:27 2006
New Revision: 6556

Log:
Updated the check that the current user cannot delete his own id - Ahmed

Modified:
    vtigercrm/trunk/modules/Users/User.php

Modified: vtigercrm/trunk/modules/Users/User.php
==============================================================================
--- vtigercrm/trunk/modules/Users/User.php (original)
+++ vtigercrm/trunk/modules/Users/User.php Sat May 27 14:48:27 2006
@@ -518,7 +518,7 @@
 	function getUserListViewEntries($navigation_array,$sorder='',$orderby='')
 	{
 		global $theme;
-		global $adb;	
+		global $adb, $current_user;	
 	    	$theme_path="themes/".$theme."/";
 	    	$image_path=$theme_path."images/";
 		if($sorder != '' && $orderby !='')
@@ -549,6 +549,10 @@
 			{
 			      $entries[]='<a href="index.php?action=EditView&return_action=ListView&return_module=Users&module=Users&parenttab=Settings&record='.$id.'"><img src="'.$image_path.'editfield.gif" border="0" alt="Edit" title="Edit"/></a>&nbsp;&nbsp;';
 	                }
+			elseif($adb->query_result($result,$i-1,'id') == $current_user->id)
+                        {
+                              $entries[]='<a href="index.php?action=EditView&return_action=ListView&return_module=Users&module=Users&parenttab=Settings&record='.$id.'"><img src="'.$image_path.'editfield.gif" border="0" alt="Edit" title="Edit"/></a>&nbsp;&nbsp;';
+	                }
 		        else
 			  
 	    	              $entries[]='<a href="index.php?action=EditView&return_action=ListView&return_module=Users&module=Users&parenttab=Settings&record='.$id.'"><img src="'.$image_path.'editfield.gif" border="0" alt="Edit" title="Edit"/></a>&nbsp;&nbsp;<img src="'.$image_path.'delete.gif" onclick="deleteUser('.$id.')" border="0"  alt="Delete" title="Delete"/></a>';





More information about the vtigercrm-commits mailing list