Skip to content

Commit

Permalink
Keep signup settings in core only
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Apr 16, 2017
1 parent c76333a commit 6fed9b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 42 deletions.
6 changes: 2 additions & 4 deletions core/authentication_api.php
Expand Up @@ -120,17 +120,15 @@ 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' );
}

/**
* Get the access level for users that signup.
* @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' );
}

/**
Expand Down
38 changes: 0 additions & 38 deletions core/classes/AuthFlags.class.php
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6fed9b7

Please sign in to comment.