[Vtigercrm-commits] [vtiger-commits] r9598 - /vtigercrm/branches/5.0.1/include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Oct 9 03:20:07 EDT 2006
Author: richie
Date: Mon Oct 9 01:20:03 2006
New Revision: 9598
Log:
code given by DG has been integrated -- Minnie
Modified:
vtigercrm/branches/5.0.1/include/utils/CommonUtils.php
Modified: vtigercrm/branches/5.0.1/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/branches/5.0.1/include/utils/CommonUtils.php (original)
+++ vtigercrm/branches/5.0.1/include/utils/CommonUtils.php Mon Oct 9 01:20:03 2006
@@ -600,9 +600,6 @@
/**
* Get the username by giving the user id. This method expects the user id
- * param $label_list - the array of strings to that contains the option list
- * param $key_list - the array of strings to that contains the values list
- * param $selected - the string which contains the default value
*/
function getUserName($userid)
@@ -620,6 +617,29 @@
}
$log->debug("Exiting getUserName method ...");
return $user_name;
+}
+
+/**
+* Get the user full name by giving the user id. This method expects the user id
+* DG 30 Aug 2006
+*/
+
+function getUserFullName($userid)
+{
+ global $log;
+ $log->debug("Entering getUserFullName(".$userid.") method ...");
+ $log->info("in getUserFullName ".$userid);
+ global $adb;
+ if($userid != '')
+ {
+ $sql = "select first_name, last_name from vtiger_users where id=".$userid;
+ $result = $adb->query($sql);
+ $first_name = $adb->query_result($result,0,"first_name");
+ $last_name = $adb->query_result($result,0,"last_name");
+ $user_name = $first_name." ".$last_name;
+ }
+ $log->debug("Exiting getUserFullName method ...");
+ return $user_name;
}
/**
More information about the vtigercrm-commits
mailing list