db_Update("user", "user_name=user_loginname"); $message = PRFLAN_157; } if (isset($_POST['updateprefs'])) { unset($_POST['updateprefs'],$_POST['sitelanguage']); $_POST['cookie_name'] = str_replace(array(" ","."), "_", $_POST['cookie_name']); $_POST['cookie_name'] = preg_replace("#[^a-zA-Z0-9_]#", "", $_POST['cookie_name']); $_POST['siteurl'] = trim($_POST['siteurl']) ? trim($_POST['siteurl']) : SITEURL; $_POST['siteurl'] = substr($_POST['siteurl'], -1) == "/" ? $_POST['siteurl'] : $_POST['siteurl']."/"; // If email verification, email address is required! if ($_POST['user_reg_veri'] == 1) $_POST['disable_emailcheck'] = 0; // Table of range checking values - min and max for numerics. Only do the important ones $pref_limits = array( 'loginname_maxlength' => array('min' => 10, 'max' => 100, 'default' => 30), 'displayname_maxlength' => array('min' => 5, 'max' => 30, 'default' => 15), 'antiflood_timeout' => array('min' => 3, 'max' => 300, 'default' => 10) ); foreach($_POST as $key => $value) { if (isset($pref_limits[$key])) { // Its a numeric value to check if (is_numeric($value)) { if ($value < $pref_limits[$key]['min']) $value = $pref_limits[$key]['min']; if ($value > $pref_limits[$key]['max']) $value = $pref_limits[$key]['max']; } else { $value = $pref_limits[$key]['default']; } $pref[$key] = $value; } else { $pref[$key] = $tp->toDB($value); } } $e107cache->clear(); save_prefs(); $sql -> db_Select_gen("TRUNCATE ".MPREFIX."online"); header("location:".e_ADMIN."prefs.php?u"); exit; } if($sql->db_Select("plugin", "plugin_path", "plugin_installflag='1' AND plugin_path = 'alt_auth'")) { $authlist[] = "e107"; $handle=opendir(e_PLUGIN."alt_auth"); while ($file = readdir($handle)) { if(preg_match("/^(.*)_auth\.php/",$file,$match)) { $authlist[] = $match[1]; } } } if ($authlist) { $auth_dropdown .= "\n"; } else { $auth_dropdown = "".PRFLAN_151; $pref['auth_method'] = ""; } require_once("auth.php"); if (isset($message)) { $ns->tablerender("", "