/** * allow to check the profile field attribute before to set it * @param string $value * @param string $attribute * @access protected * @return boolean **/ protected function validate_profile(&$value, &$attribute) { $profiles = array_keys(get_all_profiles(false)); if (in_array($value, $profiles)) { return true; } $value = null; return false; }
// detailconsult can be accessed without user_id (-> display current user) if (($action == 'detailconsult') && (! $params['user_id'])) $params['user_id'] = $obm['uid']; get_user_action(); $perm->check_permissions($module, $action); update_last_visit('user', $params['user_id'], $action); page_close(); $customFields = new OBM_Form_Field('user'); // get Profile list (name and id) $params['profiles'] = get_all_profiles(false); $params = get_user_params_mail_server_id($params); /////////////////////////////////////////////////////////////////////////////// // External calls (main menu not displayed) // /////////////////////////////////////////////////////////////////////////////// if ($action == 'ext_get_ids') { $display['search'] = html_user_search_form($params); if ($_SESSION['set_display'] == 'yes') { $display['result'] = dis_user_search_list($params); } else { $display['msg'] .= display_info_msg($l_no_display); } } elseif ($action == 'ext_get_id') { ///////////////////////////////////////////////////////////////////////////////