[Vtigercrm-commits] [vtiger-commits] r4268 - /vtigercrm/trunk/modules/Calendar/CalendarCommon.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Mar 17 01:02:47 EST 2006
Author: saraj
Date: Thu Mar 16 23:02:40 2006
New Revision: 4268
Log:
definition for function getOtherUserName has been included
Modified:
vtigercrm/trunk/modules/Calendar/CalendarCommon.php
Modified: vtigercrm/trunk/modules/Calendar/CalendarCommon.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/CalendarCommon.php (original)
+++ vtigercrm/trunk/modules/Calendar/CalendarCommon.php Thu Mar 16 23:02:40 2006
@@ -207,5 +207,27 @@
return $entries;
}
+
+/**
+ * Function to get userid and username of all users except the current user
+ * @returns $userArray -- User Array in the following format:
+ * $userArray=Array($userid1=>$username, $userid2=>$username,............,$useridn=>$username);
+ */
+function getOtherUserName($id)
+{
+ global $adb;
+ $query="select * from users where deleted=0 and id!=".$id;
+ $result = $adb->query($query);
+ $num_rows=$adb->num_rows($result);
+ $user_details=Array();
+ for($i=0;$i<$num_rows;$i++)
+ {
+ $userid=$adb->query_result($result,$i,'id');
+ $username=$adb->query_result($result,$i,'user_name');
+ $user_details[$userid]=$username;
+ }
+ return $user_details;
+}
+
//Code Added by Minnie -Ends
?>
More information about the vtigercrm-commits
mailing list