mirror of https://github.com/MISP/MISP
fix: [internal] Check if user is logged before checking if he is site admin
parent
df1ed1badf
commit
8c13330712
|
@ -508,9 +508,8 @@ class AppController extends Controller
|
|||
} else {
|
||||
$this->set('me', false);
|
||||
}
|
||||
$this->set('br', '<br />');
|
||||
$this->set('bold', array('<span class="bold">', '</span>'));
|
||||
if ($this->_isSiteAdmin()) {
|
||||
|
||||
if ($this->Auth->user() && $this->_isSiteAdmin()) {
|
||||
if (Configure::read('Session.defaults') == 'database') {
|
||||
$db = ConnectionManager::getDataSource('default');
|
||||
$sqlResult = $db->query('SELECT COUNT(id) AS session_count FROM cake_sessions WHERE expires < ' . time() . ';');
|
||||
|
|
Loading…
Reference in New Issue