Skip to content

Commit

Permalink
Fixing login is disabled checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Cryer committed Jan 22, 2015
1 parent c54f229 commit c5bdafe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion PHPCI/Helper/LoginIsDisabled.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -27,7 +29,7 @@ public function __call($method, $params = array())
{
unset($method, $params);

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

return (false !== $state);
Expand Down
5 changes: 2 additions & 3 deletions PHPCI/View/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand Down

0 comments on commit c5bdafe

Please sign in to comment.