2014-12-11 15:41:00 +01:00
|
|
|
<?php
|
|
|
|
|
2016-07-19 20:28:11 +02:00
|
|
|
namespace PHPCensor\Helper;
|
2014-12-11 15:41:00 +01:00
|
|
|
|
2015-01-22 10:17:58 +01:00
|
|
|
use b8\Config;
|
|
|
|
|
2014-12-11 15:41:00 +01:00
|
|
|
/**
|
2017-03-04 16:39:56 +01:00
|
|
|
* Login Is Disabled Helper - Checks if login is disabled in the view
|
|
|
|
*
|
|
|
|
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
|
|
|
*/
|
2014-12-11 15:41:00 +01:00
|
|
|
class LoginIsDisabled
|
|
|
|
{
|
|
|
|
/**
|
2015-02-26 09:45:42 +01:00
|
|
|
* Checks if
|
2017-01-22 12:05:24 +01:00
|
|
|
*
|
2014-12-11 15:41:00 +01:00
|
|
|
* @param $method
|
|
|
|
* @param array $params
|
2017-01-22 12:05:24 +01:00
|
|
|
*
|
2014-12-11 15:41:00 +01:00
|
|
|
* @return mixed|null
|
|
|
|
*/
|
2016-04-20 17:39:48 +02:00
|
|
|
public function __call($method, $params = [])
|
2014-12-11 15:41:00 +01:00
|
|
|
{
|
|
|
|
unset($method, $params);
|
|
|
|
|
2017-01-22 12:05:24 +01:00
|
|
|
$config = Config::getInstance();
|
|
|
|
$disableAuth = (boolean)$config->get('php-censor.security.disable_auth', false);
|
2014-12-11 15:41:00 +01:00
|
|
|
|
2017-01-22 12:05:24 +01:00
|
|
|
return $disableAuth;
|
2014-12-11 15:41:00 +01:00
|
|
|
}
|
|
|
|
}
|