Skip to content

Commit

Permalink
[5.2.3] Removing deprecated access to User object attributes (#44694)
Browse files Browse the repository at this point in the history
  • Loading branch information
heelc29 authored Jan 12, 2025
1 parent 53dc17d commit e9bbd2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/com_users/src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @package Joomla.Site
* @subpackage com_privacy
* @subpackage com_users
*
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
Expand All @@ -19,7 +19,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_privacy
* ComponentDispatcher class for com_users
*
* @since 5.2.3
*/
Expand All @@ -43,7 +43,7 @@ protected function checkAccess()
switch ($view) {
case 'registration':
// If the user is already logged in, redirect to the profile page.
if ($user->get('guest') != 1) {
if ($user->guest != 1) {
// Redirect to profile page.
$this->app->redirect(Route::_('index.php?option=com_users&view=profile', false));
}
Expand All @@ -57,15 +57,15 @@ protected function checkAccess()

// Handle view specific models.
case 'profile':
if ($user->get('guest') == 1) {
if ($user->guest == 1) {
// Redirect to login page.
$this->app->redirect(Route::_('index.php?option=com_users&view=login', false));
}
break;

case 'remind':
case 'reset':
if ($user->get('guest') != 1) {
if ($user->guest != 1) {
// Redirect to profile page.
$this->app->redirect(Route::_('index.php?option=com_users&view=profile', false));
}
Expand Down

0 comments on commit e9bbd2a

Please sign in to comment.