retrieve_entity_info($_REQUEST['record'],'Users');
$focus->id = $_REQUEST['record'];
}
else
{
echo "
";
}
if( $focus->user_name == "" )
{
if(is_admin($current_user))
{
echo "
";
//$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 = '
';
echo $output;
}
?>