From f78b6ae9f99a4aaded5ae15b961fc0001fef925f Mon Sep 17 00:00:00 2001 From: Stephen Ball Date: Thu, 11 Dec 2014 14:41:00 +0000 Subject: [PATCH] Cleanup of the disabled login mode. Hides user menu, the navigation user panel, etc. Closes #718 --- PHPCI/Helper/LoginIsDisabled.php | 35 ++++++++++++++++++++++++++++++++ PHPCI/View/layout.phtml | 5 +++++ 2 files changed, 40 insertions(+) create mode 100644 PHPCI/Helper/LoginIsDisabled.php diff --git a/PHPCI/Helper/LoginIsDisabled.php b/PHPCI/Helper/LoginIsDisabled.php new file mode 100644 index 00000000..208aac23 --- /dev/null +++ b/PHPCI/Helper/LoginIsDisabled.php @@ -0,0 +1,35 @@ + +* @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); + } +} diff --git a/PHPCI/View/layout.phtml b/PHPCI/View/layout.phtml index b6111646..a3f995d3 100644 --- a/PHPCI/View/layout.phtml +++ b/PHPCI/View/layout.phtml @@ -124,6 +124,7 @@ +LoginIsDisabled()): ?> + @@ -159,6 +161,8 @@