Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Redirect after login conditions

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 8 months ago #221239 by dotcom22
Redirect after login conditions was created by dotcom22
hello

I have 2 CB login module on my site:

- Module1 used for user who login from default site/default template
- Module2 used for user who login from mobile site/mobile template

Each module is of course published on different template position.

I have also 2 usergroup and according of group, I want redirect user to specific page:

- Group A redirect to www.site.com/group-a
- Group B redirect to www.site.com/group-b

For redirect users, I can use Auto-Action, but the problem is I would like redirect user of group B to their related page only when they login from default template. If they login from mobile template, I would like redirect to again another page.

In CB module setting is possible to set the "afterlogin" URL but this will be used for all users and not only for specific group. In Auto-Action nothing seem to be available for differentiate who login from default or mobile template..

I don't see how to set a conditions for this case..

It is a way for do that ?

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago - 11 years 8 months ago #221274 by krileon
Replied by krileon on topic Redirect after login conditions
CB Auto Actions has no idea what template they're on, so doubtful. If there's an Itemid preset then you can try [get_itemid] and try conditioning from that to determine destination.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 8 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 8 months ago #221292 by dotcom22
Replied by dotcom22 on topic Redirect after login conditions
unfortunately no itemid are present. Appropriate template is loaded according to device used (autodetection).

The best in my case would be to use the field "Login Redirection URL" present in CB login module settings. Then insert in that field conditional url using substitution such this:

[cb:if viewaccesslevel includes "4"]url group a[/cb:if][cb:if viewaccesslevel includes "5"]url group b[/cb:if]


But this don't work...

have you another suggestion please ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221344 by krileon
Replied by krileon on topic Redirect after login conditions
You can't use substitutions or conditionals in the CB Login module URL, no where does it say you can. You simply supply a URL to it beginning with index.php. If you need different parameters for different view access levels then just create 2 CB Login modules with 2 different view access levels. You can basically do the same for CB Auto Actions redirect by using different usergroups in the Access.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • duetltd
  • duetltd
  • OFFLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
11 years 8 months ago #221443 by duetltd
Replied by duetltd on topic Redirect after login conditions
I've been able to redirect to a specific url using jumi - a joomla extension that lets you write php easily. Jumi Extension Link

Also I've found mobilejoomla to be quite useful.

Good luck!

Please Log in or Create an account to join the conversation.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 8 months ago #221446 by dotcom22
Replied by dotcom22 on topic Redirect after login conditions
hello duetltd

Many thank for your suggestion...

I never used Jumi but I know what is possible to do with it. However I will not install a full component just for let me redirect users as requested in my topic. With CB it was almost possible to make my desired setup..too bad...but I will try to live without this :-)

Yes I know and use also MobileJoomla. That was the reason why I asked this because my goal was to redirect users of group B (who browse the site with mobile device under Elegance template) to another page than the same normally used when user browse the site with default template.


cheers

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum