diff --git a/components/com_users/controllers/registration.php b/components/com_users/controllers/registration.php index 3d8d59eb8eaa9..95789af4bb269 100644 --- a/components/com_users/controllers/registration.php +++ b/components/com_users/controllers/registration.php @@ -75,7 +75,7 @@ public function activate() if (($uParams->get('useractivation') == 2) && $userToActivate->getParam('activate', 0)) { // If a user admin is not logged in, redirect them to the login page with an error message - if (!$user->authorise('core.create', 'com_users')) + if (!$user->authorise('core.create', 'com_users') || !$user->authorise('core.manage', 'com_users')) { $activationUrl = 'index.php?option=com_users&task=registration.activate&token=' . $token; $loginUrl = 'index.php?option=com_users&view=login&return=' . base64_encode($activationUrl); diff --git a/components/com_users/models/registration.php b/components/com_users/models/registration.php index facad96b8abcd..3d60a5ea558bd 100644 --- a/components/com_users/models/registration.php +++ b/components/com_users/models/registration.php @@ -170,7 +170,7 @@ public function activate($token) { $usercreator = JFactory::getUser($row->id); - if ($usercreator->authorise('core.create', 'com_users')) + if ($usercreator->authorise('core.create', 'com_users') && $usercreator->authorise('core.manage', 'com_users')) { $return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBody);