From 554dfa7fc558c72096c523980d5ae1decba15a44 Mon Sep 17 00:00:00 2001 From: Tuan Pham Ngoc Date: Sun, 31 Jan 2021 15:29:46 +0700 Subject: [PATCH] Update user.php --- components/com_users/controllers/user.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/com_users/controllers/user.php b/components/com_users/controllers/user.php index 8eccdcce78021..eb952dbc6c36d 100644 --- a/components/com_users/controllers/user.php +++ b/components/com_users/controllers/user.php @@ -232,8 +232,9 @@ public function menulogout() { // Get the ItemID of the page to redirect after logout $app = JFactory::getApplication(); - $itemid = $app->getMenu()->getActive()->params->get('logout'); - + $active = $app->getMenu()->getActive(); + $itemid = $active ? $active->getParams()->get('logout') : 0; + // Get the language of the page when multilang is on if (JLanguageMultilang::isEnabled()) {