retrieve_entity_info($_REQUEST['record'],'Users'); $focus->id = $_REQUEST['record']; } else { echo " "; } if( $focus->user_name == "" ) { if(is_admin($current_user)) { echo " "; echo "
User does not exist.
List Users
"; exit; } } if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->id = ""; } global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; //the user might belong to multiple groups $log->info("User detail view"); $category = getParenttab(); $smarty = new vtigerCRM_Smarty; $smarty->assign("UMOD", $mod_strings); global $current_language; $smod_strings = return_module_language($current_language, 'Settings'); $smarty->assign("MOD", $smod_strings); $smarty->assign("APP", $app_strings); $oGetUserGroups = new GetUserGroups(); $oGetUserGroups->getAllUserGroups($focus->id); if(useInternalMailer() == 1) $smarty->assign("INT_MAILER","true"); $smarty->assign("GROUP_COUNT",count($oGetUserGroups->user_groups)); $smarty->assign("THEME", $theme); $smarty->assign("IMAGE_PATH", $image_path);$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); $smarty->assign("ID", $focus->id); $smarty->assign("CATEGORY", $category); if(isset($focus->imagename) && $focus->imagename!='') { $imagestring="

"; //$smarty->assign("USER_IMAGE",$imagestring); } if(isset($_REQUEST['modechk']) && $_REQUEST['modechk'] != '' ) { $modepref = $_REQUEST['modechk']; } if($_REQUEST['modechk'] == 'prefview') $parenttab = ''; else $parenttab = 'Settings'; $smarty->assign("PARENTTAB", $parenttab); if ((is_admin($current_user) || $_REQUEST['record'] == $current_user->id) && isset($default_user_name) && $default_user_name == $focus->user_name && isset($lock_default_user_name) && $lock_default_user_name == true) { $buttons = ""; $smarty->assign('EDIT_BUTTON',$buttons); } elseif (is_admin($current_user) || $_REQUEST['record'] == $current_user->id) { $buttons = ""; $smarty->assign('EDIT_BUTTON',$buttons); $buttons = ""; $smarty->assign('CHANGE_PW_BUTTON',$buttons); } if (is_admin($current_user)) { $buttons = ""; $smarty->assign('DUPLICATE_BUTTON',$buttons); //done so that only the admin user can see the customize tab button if($_REQUEST['record'] != $current_user->id) { $buttons = "id')\" type='button' name='Delete' value=' ".$app_strings['LBL_DELETE_BUTTON_LABEL']." '>"; $smarty->assign('DELETE_BUTTON',$buttons); } if($_SESSION['authenticated_user_roleid'] == 'administrator') { $buttons = ""; $smarty->assign('LISTROLES_BUTTON',$buttons); } } if(is_admin($current_user)) $smarty->assign("IS_ADMIN", true); else $smarty->assign("IS_ADMIN", false); $lead_tables = Array('vtiger_users','vtiger_user2role'); $tabid = getTabid("Users"); $validationData = getDBValidationData($lead_tables,$tabid); $data = split_validationdataArray($validationData); if($current_user->id == $_REQUEST['record'] || is_admin($current_user) == true) { $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); $smarty->assign("MODULE", 'Users'); $smarty->assign("CURRENT_USERID", $current_user->id); $smarty->assign("HOMEORDER",$focus->getHomeStuffOrder($focus->id)); //Added to provide User based Tagcloud $smarty->assign("TAGCLOUDVIEW",getTagCloudView($focus->id)); $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); $smarty->assign("USERNAME", getFullNameFromArray('Users', $focus->column_fields)); $smarty->assign("HOUR_FORMAT",$focus->hour_format); $smarty->assign("START_HOUR",$focus->start_hour); $_SESSION['Users_FORM_TOKEN'] = rand(5, 2000) * rand(2, 7); $smarty->assign('FORM_TOKEN', $_SESSION['Users_FORM_TOKEN']); //for check audittrail if it is enable or not $smarty->assign("AUDITTRAIL",$audit_trail); $smarty->assign("view", null); $smarty->display("UserDetailView.tpl"); } else { $output = '
'.$app_strings["LBL_PERMISSION"].'
'.$app_strings["LBL_GO_BACK"].'
'; echo $output; } ?>