php-censor/src/PHPCensor/Helper/LoginIsDisabled.php

32 lines
610 B
PHP
Raw Normal View History

<?php
2016-07-19 20:28:11 +02:00
namespace PHPCensor\Helper;
2015-01-22 10:17:58 +01:00
use b8\Config;
/**
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>
*/
class LoginIsDisabled
{
/**
2015-02-26 09:45:42 +01:00
* Checks if
*
* @param $method
* @param array $params
*
* @return mixed|null
*/
2016-04-20 17:39:48 +02:00
public function __call($method, $params = [])
{
unset($method, $params);
$config = Config::getInstance();
$disableAuth = (boolean)$config->get('php-censor.security.disable_auth', false);
return $disableAuth;
}
}