Fixed LDAP authentication + unified app config options: authenticate_settings, security and ldap

This commit is contained in:
Dmitry Khomutov 2017-01-22 18:05:24 +07:00
commit f3bdeb2493
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
17 changed files with 105 additions and 245 deletions

View file

@ -21,17 +21,19 @@ class LoginIsDisabled
{
/**
* Checks if
*
* @param $method
* @param array $params
*
* @return mixed|null
*/
public function __call($method, $params = [])
{
unset($method, $params);
$config = Config::getInstance();
$state = (bool) $config->get('php-censor.authentication_settings.state', false);
$config = Config::getInstance();
$disableAuth = (boolean)$config->get('php-censor.security.disable_auth', false);
return (false !== $state);
return $disableAuth;
}
}