Joomla has always had the ability to redirect users after they log in. That's useful, but there are times when a single destination for everybody just isn't enough.
You might have customers, members, subscribers, editors, or people who belong to entirely different groups. Do you really want all of them landing on the same page after logging in?
Probably not.
A member might need to go to their member area, an editor might need to go to a particular section of the site, and a customer might need to go somewhere completely different.
Joomla's standard login redirect settings don't provide that level of flexibility based on user groups.
So I've created a little system plugin to solve that problem: Group Login Redirect. And because there is no reason to stop halfway, it also handles logout redirects.
Redirect based on Joomla user groups
The plugin allows you to create as many rules as you need.
Each rule consists of a Joomla user group and two optional destinations:
-
Where users in that group should be sent after logging in.
-
Where users in that group should be sent after logging out.
You select the user group from the groups already configured on your Joomla website, and then select the destination from your frontend menu items.
No manually entering URLs, no hard-coded group names, and no need to start writing your own PHP code.
The plugin stores the selected group ID and menu item IDs, using Joomla's existing configuration.
What happens when someone belongs to more than one group?
Joomla users can belong to multiple user groups, and that means a user could potentially match more than one of your redirect rules.
The plugin evaluates your configured rules from top to bottom. The first matching rule with a destination configured for the relevant action is used.
That means you can control which rule takes priority simply by changing the order of your rules.
Login and logout destinations are evaluated independently, so you don't have to configure both destinations for every group.
For example, perhaps you want members to go to their members' area when they log in, but you don't have a special logout destination for them. Just leave the logout destination empty and Joomla's normal logout redirect behaviour remains in place.
What about logout?
This is the part that makes the plugin a little more useful than a straightforward login redirect extension.
Quite often, you want users to arrive somewhere specific after logging out.
Perhaps you want members to return to your public homepage, while customers should be sent to a page explaining how to log back in.
Group Login Redirect lets you configure those destinations independently of the login destinations.
So you can have one destination after login and another after logout, all configured using the same group rules.
What it doesn't do
The plugin deliberately concentrates on frontend logins and logouts.
It doesn't change administrator login or logout behaviour, and it doesn't interfere with Joomla's normal redirect handling when no matching rule has a destination configured.
If there is no applicable rule, Joomla carries on doing what it normally does.
That was an important design decision. An extension should solve the problem it was created for without unexpectedly changing other behaviour.
Getting it
You can find the source code, documentation and installation package here:
Group Login Redirect on GitHub
The plugin includes its own Joomla update server, meaning updates can be discovered through Joomla's extension update mechanism.
It's another example of a fairly small Joomla system plugin that fills a gap in the functionality available out of the box.
Sometimes you don't need a massive extension with a hundred configuration options. You just need Joomla to do one more useful thing.



Congratulations, you discovered a hidden secret!