Skip to content

Commit

Permalink
Check if the correct layout is used (joomla#19485)
Browse files Browse the repository at this point in the history
  • Loading branch information
OctavianC authored and tecpromotion committed May 23, 2019
1 parent 6485f9c commit ab00594
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/com_users/helpers/legacyrouter.php
Expand Up @@ -106,7 +106,7 @@ public function build(&$query, &$segments)
}

// Check to see if we have found the login menu item.
if (empty($login) && $item->query['view'] === 'login')
if (empty($login) && $item->query['view'] === 'login' && (empty($item->query['layout']) || $item->query['layout'] === 'default'))
{
$login = $item->id;

Expand Down
2 changes: 1 addition & 1 deletion components/com_users/helpers/route.php
Expand Up @@ -61,7 +61,7 @@ public static function getLoginRoute()
// Search for a suitable menu id.
foreach ($items as $item)
{
if (isset($item->query['view']) && $item->query['view'] === 'login')
if (isset($item->query['view']) && $item->query['view'] === 'login' && (empty($item->query['layout']) || $item->query['layout'] === 'default'))
{
return $item->id;
}
Expand Down

0 comments on commit ab00594

Please sign in to comment.