grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026deprecated($deprecatedMessage);
} else {
trigger_error($deprecatedMessage, E_USER_DEPRECATED);
}
self::__construct();
}
public function preDisplay()
{
$this->fieldHelper = new UserViewHelper($this->ss, $this->bean, 'EditView');
$this->fieldHelper->setupAdditionalFields();
parent::preDisplay();
}
public function getMetaDataFile()
{
$userType = 'Regular';
if ($this->fieldHelper->usertype == 'GROUP') {
$userType = 'Group';
}
if ($userType != 'Regular') {
$oldType = $this->type;
$this->type = $oldType.'group';
}
$metadataFile = parent::getMetaDataFile();
if ($userType != 'Regular') {
$this->type = $oldType;
}
return $metadataFile;
}
public function display()
{
global $current_user, $app_list_strings, $mod_strings;
//lets set the return values
if (isset($_REQUEST['return_module'])) {
$this->ss->assign('RETURN_MODULE', $_REQUEST['return_module']);
}
$this->ss->assign('IS_ADMIN', $current_user->is_admin ? true : false);
//make sure we can populate user type dropdown. This usually gets populated in predisplay unless this is a quickeditform
if (!isset($this->fieldHelper)) {
$this->fieldHelper = new UserViewHelper($this->ss, $this->bean, 'EditView');
$this->fieldHelper->setupAdditionalFields();
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$this->ss->assign('RETURN_MODULE', $_REQUEST['return_module']);
$this->ss->assign('RETURN_ACTION', $_REQUEST['return_action']);
$this->ss->assign('RETURN_ID', $_REQUEST['record']);
$this->bean->id = "";
$this->bean->user_name = "";
$this->ss->assign('ID', '');
} else {
if (isset($_REQUEST['return_module'])) {
$this->ss->assign('RETURN_MODULE', $_REQUEST['return_module']);
} else {
$this->ss->assign('RETURN_MODULE', $this->bean->module_dir);
}
$return_id = isset($_REQUEST['return_id'])?$_REQUEST['return_id']:$this->bean->id;
if (isset($return_id)) {
$return_action = isset($_REQUEST['return_action'])?$_REQUEST['return_action']:'DetailView';
$this->ss->assign('RETURN_ID', $return_id);
$this->ss->assign('RETURN_ACTION', $return_action);
}
}
///////////////////////////////////////////////////////////////////////////////
//// REDIRECTS FROM COMPOSE EMAIL SCREEN
if (isset($_REQUEST['type']) && (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Emails')) {
$this->ss->assign('REDIRECT_EMAILS_TYPE', $_REQUEST['type']);
}
//// END REDIRECTS FROM COMPOSE EMAIL SCREEN
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//// NEW USER CREATION ONLY
if (empty($this->bean->id)) {
$this->ss->assign('SHOW_ADMIN_CHECKBOX', 'height="30"');
$this->ss->assign('NEW_USER', '1');
} else {
$this->ss->assign('NEW_USER', '0');
$this->ss->assign('NEW_USER_TYPE', 'DISABLED');
}
//// END NEW USER CREATION ONLY
///////////////////////////////////////////////////////////////////////////////
// FIXME: Translate error prefix
if (isset($_REQUEST['error_string'])) {
LoggerManager::getLogger()->warn('Using error string in request is deprecated: ' . $_REQUEST[
'error_string']);
$this->ss->assign('ERROR_STRING', 'Error: ' . $mod_strings['LBL_ERROR'] . '');
}
if (isset($_REQUEST['error_password'])) {
LoggerManager::getLogger()->warn('Using password error in request is deprecated: ' . $_REQUEST[
'error_password']);
$this->ss->assign('ERROR_PASSWORD', 'Error: ' . $mod_strings['LBL_ERROR'
] . '');
}
// Build viewable versions of a few fields for non-admins
if (!empty($this->bean->id)) {
if (!empty($this->bean->status)) {
$this->ss->assign('STATUS_READONLY', $app_list_strings['user_status_dom'][$this->bean->status]);
}
if (!empty($this->bean->employee_status)) {
$this->ss->assign('EMPLOYEE_STATUS_READONLY', $app_list_strings['employee_status_dom'][$this->bean->employee_status]);
}
if (!empty($this->bean->reports_to_id)) {
$reportsToUser = get_assigned_user_name($this->bean->reports_to_id);
$reportsToUserField = "\n";
$reportsToUserField .= "";
$this->ss->assign('REPORTS_TO_READONLY', $reportsToUserField);
}
if (!empty($this->bean->title)) {
$this->ss->assign('TITLE_READONLY', $this->bean->title);
}
if (!empty($this->bean->department)) {
$this->ss->assign('DEPT_READONLY', $this->bean->department);
}
}
$processSpecial = false;
$processFormName = '';
if (isset($this->fieldHelper->usertype) && (
$this->fieldHelper->usertype == 'GROUP'
)) {
$this->ev->formName = 'EditViewGroup';
$processSpecial = true;
$processFormName = 'EditViewGroup';
}
//Bug#51609 Replace {php} code block in EditViewHeader.tpl
$action_button = array();
$APP = $this->ss->get_template_vars('APP');
$PWDSETTINGS = $this->ss->get_template_vars('PWDSETTINGS');
$REGEX = $this->ss->get_template_vars('REGEX');
$CHOOSER_SCRIPT = $this->ss->get_template_vars('CHOOSER_SCRIPT');
$REASSIGN_JS = $this->ss->get_template_vars('REASSIGN_JS');
$RETURN_ACTION = $this->ss->get_template_vars('RETURN_ACTION');
$RETURN_MODULE = $this->ss->get_template_vars('RETURN_MODULE');
$RETURN_ID = $this->ss->get_template_vars('RETURN_ID');
$minpwdlength = !empty($PWDSETTINGS['minpwdlength']) ? $PWDSETTINGS['minpwdlength'] : '';
$maxpwdlength = !empty($PWDSETTINGS['maxpwdlength']) ? $PWDSETTINGS['maxpwdlength'] : '';
$action_button_header[] = <<