Profile Id */ public function getId() { return $this->get('login_id'); } /** * Function to get the Profile Name * @return */ public function getName() { return $this->get('user_name'); } public function getAccessibleUsers(){ $adb = PearDatabase::getInstance(); $usersListArray = array(); $query = 'SELECT user_name, first_name, last_name FROM vtiger_users'; $result = $adb->pquery($query, array()); while($row = $adb->fetchByAssoc($result)) { $usersListArray[$row['user_name']] = getFullNameFromArray('Users', $row); } return $usersListArray; } /** * Function to retieve display value for a field * @param $fieldName - field name for which values need to get * @return */ public function getDisplayValue($fieldName, $recordId = false) { if($fieldName == 'login_time' || $fieldName == 'logout_time'){ if($this->get($fieldName) != '0000-00-00 00:00:00'){ return Vtiger_Datetime_UIType::getDateTimeValue($this->get($fieldName)); }else{ return '---'; } } else { return $this->get($fieldName); } } }