Fixing login is disabled checks
This commit is contained in:
parent
11789c4005
commit
6e230a6ea3
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
namespace PHPCI\Helper;
|
namespace PHPCI\Helper;
|
||||||
|
|
||||||
|
use b8\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login Is Disabled Helper - Checks if login is disalbed in the view
|
* Login Is Disabled Helper - Checks if login is disalbed in the view
|
||||||
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
||||||
|
@ -27,7 +29,7 @@ class LoginIsDisabled
|
||||||
{
|
{
|
||||||
unset($method, $params);
|
unset($method, $params);
|
||||||
|
|
||||||
$config = b8\Config::getInstance();
|
$config = Config::getInstance();
|
||||||
$state = (bool) $config->get('phpci.authentication_settings.state', false);
|
$state = (bool) $config->get('phpci.authentication_settings.state', false);
|
||||||
|
|
||||||
return (false !== $state);
|
return (false !== $state);
|
||||||
|
|
|
@ -135,8 +135,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<?php if (!$this->LoginIsDisabled()->check()): ?>
|
||||||
<?php if (!$this->LoginIsDisabled()): ?>
|
|
||||||
<!-- User Account: style can be found in dropdown.less -->
|
<!-- User Account: style can be found in dropdown.less -->
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
@ -174,7 +173,7 @@
|
||||||
<!-- sidebar: style can be found in sidebar.less -->
|
<!-- sidebar: style can be found in sidebar.less -->
|
||||||
<section class="sidebar">
|
<section class="sidebar">
|
||||||
|
|
||||||
<?php if (!$this->LoginIsDisabled()): ?>
|
<?php if (!$this->LoginIsDisabled()->check()): ?>
|
||||||
<!-- Sidebar user panel -->
|
<!-- Sidebar user panel -->
|
||||||
<div class="user-panel">
|
<div class="user-panel">
|
||||||
<div class="pull-left image">
|
<div class="pull-left image">
|
||||||
|
|
Loading…
Reference in a new issue