From 76343fb91511b9f53e58b6c01b258bfe00ddb4c6 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 24 Oct 2014 08:31:47 +0200 Subject: Use an INI-style configuration file Replace web/lib/config.inc.php with an INI-style configuration file. This allows us to get rid of several globals and makes it easier to use the same configuration file in external scripts. Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 66 ++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 35 deletions(-) (limited to 'web/lib/acctfuncs.inc.php') diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 2272010..1d38fe1 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -89,7 +89,7 @@ function display_account_form($A,$U="",$T="",$S="", */ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="", $P="",$C="",$R="",$L="",$I="",$K="",$J="",$UID=0) { - global $SUPPORTED_LANGS, $AUR_LOCATION; + global $SUPPORTED_LANGS; $error = ''; @@ -118,9 +118,11 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="", } if (!$error && !valid_username($U)) { + $length_min = config_get_int('options', 'username_min_len'); + $length_max = config_get_int('options', 'username_max_len'); + $error = __("The username is invalid.") . "