Cleanup of the disabled login mode.
Hides user menu, the navigation user panel, etc. Closes #718
This commit is contained in:
parent
6faf24ae25
commit
20f42256bd
2 changed files with 40 additions and 0 deletions
35
PHPCI/Helper/LoginIsDisabled.php
Normal file
35
PHPCI/Helper/LoginIsDisabled.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* PHPCI - Continuous Integration for PHP
|
||||
*
|
||||
* @copyright Copyright 2014, Block 8 Limited.
|
||||
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
||||
* @link https://www.phptesting.org/
|
||||
*/
|
||||
|
||||
namespace PHPCI\Helper;
|
||||
|
||||
/**
|
||||
* Login Is Disabled Helper - Checks if login is disalbed in the view
|
||||
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
||||
* @package PHPCI
|
||||
* @subpackage Web
|
||||
*/
|
||||
class LoginIsDisabled
|
||||
{
|
||||
/**
|
||||
* Checks if
|
||||
* @param $method
|
||||
* @param array $params
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function __call($method, $params = array())
|
||||
{
|
||||
unset($method, $params);
|
||||
|
||||
$config = b8\Config::getInstance();
|
||||
$state = (bool) $config->get('phpci.authentication_settings.state', false);
|
||||
|
||||
return (false !== $state);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue