bean->id) ) { // No reason to set everything up just to have it fail in the display() call return; } parent::preDisplay(); $viewHelper = new UserViewHelper($this->ss, $this->bean, 'DetailView'); $viewHelper->setupAdditionalFields(); $errors = ""; $msgGood = false; if (isset($_REQUEST['pwd_set']) && $_REQUEST['pwd_set']!= 0){ if ($_REQUEST['pwd_set']=='4'){ require_once('modules/Users/password_utils.php'); $errors.=canSendPassword(); } else { $errors.=translate('LBL_NEW_USER_PASSWORD_'.$_REQUEST['pwd_set'],'Users'); $msgGood = true; } }else{ //IF BEAN USER IS LOCKOUT if($this->bean->getPreference('lockout')=='1') { $errors.=translate('ERR_USER_IS_LOCKED_OUT','Users'); } } $this->ss->assign("ERRORS", $errors); $this->ss->assign("ERROR_MESSAGE", $msgGood ? translate('LBL_PASSWORD_SENT','Users') : translate('LBL_CANNOT_SEND_PASSWORD','Users')); $buttons = ""; if ((is_admin($current_user) || $_REQUEST['record'] == $current_user->id ) && !empty($sugar_config['default_user_name']) && $sugar_config['default_user_name'] == $this->bean->user_name && isset($sugar_config['lock_default_user_name']) && $sugar_config['lock_default_user_name']) { $buttons .= "".$app_strings['LBL_EDIT_BUTTON_LABEL']." "; $buttons .= ""; } elseif (is_admin($current_user)|| ($GLOBALS['current_user']->isAdminForModule('Users')&& !$this->bean->is_admin) || $_REQUEST['record'] == $current_user->id) { $buttons .= "".$app_strings['LBL_EDIT_BUTTON_LABEL']." "; $buttons .= ""; $buttons .= "