Skip to content

Commit

Permalink
Admin: moving code so that settings variables are intiated before and…
Browse files Browse the repository at this point in the history
… can be used -refs BT#20179
  • Loading branch information
NicoDucou committed Oct 3, 2022
1 parent 561b2b9 commit d25f53f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions main/inc/global.inc.php
Expand Up @@ -67,17 +67,6 @@
// Check the PHP version
api_check_php_version($includePath.'/');

// Specification for usernames:
// 1. ASCII-letters, digits, "." (dot), "_" (underscore) are acceptable, 40 characters maximum length.
// 2. Empty username is formally valid, but it is reserved for the anonymous user.
// 3. Checking the login_is_email portal setting in order to accept 100 chars maximum

$defaultUserNameLength = 50;
if (api_get_setting('login_is_email') == 'true') {
$defaultUserNameLength = 100;
}
define('USERNAME_MAX_LENGTH', $defaultUserNameLength);

// Fix bug in IIS that doesn't fill the $_SERVER['REQUEST_URI'].
api_request_uri();

Expand Down Expand Up @@ -321,6 +310,17 @@

ini_set('log_errors', '1');

// Specification for usernames:
// 1. ASCII-letters, digits, "." (dot), "_" (underscore) are acceptable, 40 characters maximum length.
// 2. Empty username is formally valid, but it is reserved for the anonymous user.
// 3. Checking the login_is_email portal setting in order to accept 100 chars maximum

$defaultUserNameLength = 50;
if (api_get_setting('login_is_email') == 'true') {
$defaultUserNameLength = 100;
}
define('USERNAME_MAX_LENGTH', $defaultUserNameLength);

// Load allowed tag definitions for kses and/or HTMLPurifier.
require_once $libraryPath.'formvalidator/Rule/allowed_tags.inc.php';

Expand Down

0 comments on commit d25f53f

Please sign in to comment.