Skip to Content Skip to Menu

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

[SOLVED] Choosing which modules are displayed when CB throws error message on sign in

  • rjm_cmyk
  • rjm_cmyk
  • OFFLINE
  • Posts: 12
  • Thanks: 2
  • Karma: 1
11 years 1 month ago - 11 years 1 month ago #233611 by rjm_cmyk
I am trying to display certain modules around the sign in page. Works fine on the usual sign in page but if the user has not activated their account CB sends the user back to a/the sign in page with an error message along the lines "if you haven't activated your account etc".

Problem I have is that this sign in page + error message isn't being addressed for the purposes of placing modules around it. There are no modules.

I have tried adding the url to a hidden menu (SEF is on) and that doesn't work. Adding CB sign on option via hidden menu doesn't work either. Otherwise all other things work fine.
Last edit: 11 years 1 month ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233621 by krileon
Disable SEF then reproduce the error message. Now review what Itemid is in the URL in your browsers address bar. Match that Itemid to its Joomla menu link and that'll be the menu item you need to assign modules to. Normally this is just your CB profile menu link.


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.

  • rjm_cmyk
  • rjm_cmyk
  • OFFLINE
  • Posts: 12
  • Thanks: 2
  • Karma: 1
11 years 1 month ago #233654 by rjm_cmyk
Thanks for this but I'm hoping now to approach the problem from a different angle. I would prefer to redirect the user to a page where I can configure the message myself and it makes it much easier to decide on module configuration.

Using CB actions (wonderful tool) would appear to offer a way but I'm unsure what condition I'm checking for. I thought I could use loginAuthentication and onBeforeUserActive but that just redirects all logins. Using only the onBeforeUserActive doesn't work possibly because I need to add a conditional to check that the account has been activated - problem is - I have no idea if I'm using the right action trigger .

All I want to do is check if the user account is activated and if not then redirect else login as normal.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233666 by krileon
You should be able to use onBeforeLoginFormDisplay then have a conditional to check if [var2] is not empty then redirect. Example as follows.

Type: Redirect
Triggers: onBeforeLoginFormDisplay
Access: Everybody
Conditional 1: [var2] Not Empty
URL: index.php


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.
The following user(s) said Thank You: rjm_cmyk

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

  • rjm_cmyk
  • rjm_cmyk
  • OFFLINE
  • Posts: 12
  • Thanks: 2
  • Karma: 1
11 years 1 month ago - 11 years 1 month ago #233676 by rjm_cmyk
Hi,

Thanks for this - CB Actions is obviously a really useful tool. Just a shame there is so little documentation.

Case in point - I can work out what the trigger is and even know I need test if something is true (if then else sort of construct) but the lack of any documentation means I have no idea what [var2] is .

Is there any documentation about how to work out which database parameters/field values are available to test and what they're called ?

Thanks

<Later>

I'm still doing some testing but the following seems to be working as intended

onDuringLogin
everybody
[confirmed] NOT EQUAL 1
URL

Not sure why confirmed EQUAL 0 doesn't work but there you go
Last edit: 11 years 1 month ago by rjm_cmyk. Reason: Got something to work !

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233688 by krileon

Case in point - I can work out what the trigger is and even know I need test if something is true (if then else sort of construct) but the lack of any documentation means I have no idea what [var2] is .

CB Auto Actions trys to parse var1 to 10. These are the variables sent by the trigger. All of which is documented below for every trigger in CB. Find the trigger you'd like to use in the list and you'll be able to see what variables it sends, which can be substituted in CB Auto Actions.

www.joomlapolis.com/support/tutorials/120-api-usage/18358-using-cb-triggers

Specifically for that trigger [var2] is the login error message.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum