Skip to content

Commit c5bdafe

Browse files
author
Dan Cryer
committed
Fixing login is disabled checks
1 parent c54f229 commit c5bdafe

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

PHPCI/Helper/LoginIsDisabled.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
namespace PHPCI\Helper;
1111

12+
use b8\Config;
13+
1214
/**
1315
* Login Is Disabled Helper - Checks if login is disalbed in the view
1416
* @author Stephen Ball <[email protected]>
@@ -27,7 +29,7 @@ public function __call($method, $params = array())
2729
{
2830
unset($method, $params);
2931

30-
$config = b8\Config::getInstance();
32+
$config = Config::getInstance();
3133
$state = (bool) $config->get('phpci.authentication_settings.state', false);
3234

3335
return (false !== $state);

PHPCI/View/layout.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@
135135
</ul>
136136
</li>
137137

138-
139-
<?php if (!$this->LoginIsDisabled()): ?>
138+
<?php if (!$this->LoginIsDisabled()->check()): ?>
140139
<!-- User Account: style can be found in dropdown.less -->
141140
<li class="dropdown user user-menu">
142141
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@@ -174,7 +173,7 @@
174173
<!-- sidebar: style can be found in sidebar.less -->
175174
<section class="sidebar">
176175

177-
<?php if (!$this->LoginIsDisabled()): ?>
176+
<?php if (!$this->LoginIsDisabled()->check()): ?>
178177
<!-- Sidebar user panel -->
179178
<div class="user-panel">
180179
<div class="pull-left image">

0 commit comments

Comments
 (0)