diff --git a/core/authentication_api.php b/core/authentication_api.php index 64cdc6a719..c9feb08390 100644 --- a/core/authentication_api.php +++ b/core/authentication_api.php @@ -120,8 +120,7 @@ function auth_allow_perm_login() { * @return bool true: enabled, false otherwise. */ function auth_signup_enabled() { - $t_auth_flags = auth_flags(); - return $t_auth_flags->getSignupEnabled(); + return config_get_global( 'allow_signup' ); } /** @@ -129,8 +128,7 @@ function auth_signup_enabled() { * @return integer The access level to use. */ function auth_signup_access_level() { - $t_auth_flags = auth_flags(); - return $t_auth_flags->getSignupAccessLevel(); + return config_get( 'default_new_account_access_level' ); } /** diff --git a/core/classes/AuthFlags.class.php b/core/classes/AuthFlags.class.php index db9fd46202..2b24554435 100644 --- a/core/classes/AuthFlags.class.php +++ b/core/classes/AuthFlags.class.php @@ -36,20 +36,6 @@ * A class that that contains authentication flags. */ class AuthFlags { - /** - * Core signup functionality is enabled. - * @see $signup_access_level - * @var bool|null - */ - private $signup_enabled = null; - - /** - * The access level to assign to users who use core signup functionality. - * @see $signup_enabled - * @var int|null - */ - private $signup_access_level = null; - /** * The access level or array of access levels that can leverage MantisBT native passwords. * @var int|array|null @@ -141,30 +127,6 @@ class AuthFlags { function __construct() { } - function setSignupEnabled( $p_enabled ) { - $this->signup_enabled = $p_enabled; - } - - function getSignupEnabled() { - if( is_null( $this->signup_enabled ) ) { - return config_get_global( 'allow_signup' ); - } - - return $this->signup_enabled; - } - - function setSignupAccessLevel( $p_access_level ) { - $this->signup_access_level = $p_access_level; - } - - function getSignupAccessLevel() { - if( is_null( $this->signup_access_level ) ) { - return config_get( 'default_new_account_access_level' ); - } - - return $this->signup_access_level; - } - function setSetPasswordThreshold( $p_threshold ) { $this->access_level_set_password = $p_threshold; }