Fixing login is disabled checks

This commit is contained in:
Dan Cryer 2015-01-22 09:17:58 +00:00
parent 11789c4005
commit 6e230a6ea3
2 changed files with 5 additions and 4 deletions

View file

@ -9,6 +9,8 @@
namespace PHPCI\Helper;
use b8\Config;
/**
* Login Is Disabled Helper - Checks if login is disalbed in the view
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
@ -27,7 +29,7 @@ class LoginIsDisabled
{
unset($method, $params);
$config = b8\Config::getInstance();
$config = Config::getInstance();
$state = (bool) $config->get('phpci.authentication_settings.state', false);
return (false !== $state);

View file

@ -135,8 +135,7 @@
</ul>
</li>
<?php if (!$this->LoginIsDisabled()): ?>
<?php if (!$this->LoginIsDisabled()->check()): ?>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@ -174,7 +173,7 @@
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<?php if (!$this->LoginIsDisabled()): ?>
<?php if (!$this->LoginIsDisabled()->check()): ?>
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">