File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * PHPCI - Continuous Integration for PHP
4
+ *
5
+ * @copyright Copyright 2014, Block 8 Limited.
6
+ * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+ * @link https://www.phptesting.org/
8
+ */
9
+
10
+ namespace PHPCI \Helper ;
11
+
12
+ /**
13
+ * Login Is Disabled Helper - Checks if login is disalbed in the view
14
+ * @author Stephen Ball <[email protected] >
15
+ * @package PHPCI
16
+ * @subpackage Web
17
+ */
18
+ class LoginIsDisabled
19
+ {
20
+ /**
21
+ * Checks if
22
+ * @param $method
23
+ * @param array $params
24
+ * @return mixed|null
25
+ */
26
+ public function __call ($ method , $ params = array ())
27
+ {
28
+ unset($ method , $ params );
29
+
30
+ $ config = b8 \Config::getInstance ();
31
+ $ state = (bool ) $ config ->get ('phpci.authentication_settings.state ' , false );
32
+
33
+ return (false !== $ state );
34
+ }
35
+ }
Original file line number Diff line number Diff line change 124
124
</li>
125
125
126
126
127
+ <?php if (!$ this ->LoginIsDisabled ()): ?>
127
128
<!-- User Account: style can be found in dropdown.less -->
128
129
<li class="dropdown user user-menu">
129
130
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
150
151
</li>
151
152
</ul>
152
153
</li>
154
+ <?php endif ; ?>
153
155
</ul>
154
156
</div>
155
157
</nav>
159
161
<aside class="left-side sidebar-offcanvas">
160
162
<!-- sidebar: style can be found in sidebar.less -->
161
163
<section class="sidebar">
164
+
165
+ <?php if (!$ this ->LoginIsDisabled ()): ?>
162
166
<!-- Sidebar user panel -->
163
167
<div class="user-panel">
164
168
<div class="pull-left image">
170
174
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
171
175
</div>
172
176
</div>
177
+ <?php endif ; ?>
173
178
174
179
<!-- sidebar menu: : style can be found in sidebar.less -->
175
180
<ul class="sidebar-menu">
You can’t perform that action at this time.
0 commit comments