Skip to content

Commit

Permalink
hmmm
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Oct 3, 2016
1 parent a31c4d9 commit 128b300
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions libraries/cms/application/administrator.php
Expand Up @@ -469,18 +469,28 @@ protected function route()
*/
public function findOption()
{
$option = strtolower($this->input->get('option'));
$this->loadIdentity();
$user = $this->getIdentity();
$app = JFactory::getApplication();
$option = strtolower($app->input->get('option'));
$user = $app->getIdentity();

if (!$user)
{
$app->loadIdentity(JFactory::getUser());
$user = $app->getIdentity();
}

if ($user->get('guest') || !$user->authorise('core.login.admin'))
{
$option = 'com_login';
}

if (empty($option))
{
$option = 'com_cpanel';
}
$this->input->set('option', $option);

$app->input->set('option', $option);

return $option;
}
}

0 comments on commit 128b300

Please sign in to comment.