Separate login redirect based on group?

18 years 2 months ago #5431 by nutbuster
Separate login redirect based on group? was created by nutbuster
Hi, does anyone know of a way to redirect a user to a specific page based on their group after logging in?

I have been using the community builder cbloginrc2 module, which you can set a url for everyone to redirect to, but I now need to redirect members to different pages after they login based on what group they are registered under. I use JACLPlus, so I have many levels of groups, not just the default 3.

Example:

All members of group ExampleGroup1 will be redirected to this url upon login: (Group1Homepage.php)
All members of group ExampleGroup2 will be redirected to this url upon login: (Group2Homepage.php)

Any help will be appreciated!

Thanks!

Please Log in to join the conversation.

18 years 2 months ago #5500 by nutbuster
Replied by nutbuster on topic Re:Separate login redirect based on group?
I guess this is not possible?

Please Log in to join the conversation.

18 years 2 months ago #5501 by mikko
Replied by mikko on topic Re:Separate login redirect based on group?
No, but it could be done with a plugin. Just send a redirect header during the onlogin function and exit then.

-mikko

Please Log in to join the conversation.

18 years 2 months ago #5762 by nutbuster
Replied by nutbuster on topic Re:Separate login redirect based on group?
Do you happen to know where the onlogin function is? I cannot seem to find it. :dry:


Thanks!

Please Log in to join the conversation.

18 years 2 months ago #5763 by Raj
Rather than handle it by group, it might be nice to have a general purpose plug in that lets a user specify their log in page. Then they can copy and paste any URL they want, be it their own profile or some section or category news page or whatever. Let the user make themselves happy.

Roger

Please Log in to join the conversation.

18 years 2 months ago #5764 by nutbuster
Replied by nutbuster on topic Re:Separate login redirect based on group?
That would not be a bad idea for a plugin, but in my situation, the content is group specific. The content for each group is only viewable by that group.

Each group has their own secure section that no other group can view, and I need to take each group member to their main page when they login.

What I am thinking about doing is adding a field to the cb user table in the database called loginURL or something and having the login script take the user to that page upon login, or to the default page if that field is blank.

Post edited by: nutbuster, at: 2006/02/07 20:54

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn