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] Auto-Action: How to use different user ?

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 1 month ago #233926 by dotcom22
Replied by dotcom22 on topic Auto-Action: How to use different user ?
Ok but my trigger is well "onAfterUserRegistration"..so I'm supposed to get the password in cleartext...or not ?

In fact before all was fine for me with this action. Now I get trouble because I decided to apply a condition and to change setting User with "User" instead to "Automatic". The condition is related to a checkbox and if this field is ticked, the action is not fired. Due to the fact the checkbox is related to user who make the registration and not to user being registering, I don't see how to apply my condition...

Any clue ?

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: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233933 by krileon
Replied by krileon on topic Auto-Action: How to use different user ?
Yes, if you use the onAfterUserRegistration trigger you can use [password] and it'll be cleartext. If you're using randomly generated passwords then it'll be a random 12 character string. Checkboxes use the values 1 or 0/NULL. Always check if it's Equal To or Not Equal To 1 to properly condition a checkbox (Empty or Not Empty may also work).


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.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 1 month ago #233948 by dotcom22
Replied by dotcom22 on topic Auto-Action: How to use different user ?
Yes the password is in "cleartext" but as I said it seem to be already encoded because it is composed of more than 30 characters/numbers.

So I don't see how to solve this... Of course my case is special because normally is not possible to register from frontend if already logged-in. I can do that because I made a plugin who allow me to do this (a small CB hack was necessary for allow this).

So for what I understand I must choose between 3 method:

1) Set my action to "Automatic" but this do not permit do apply a condition based of the checkbox who is related to user who make the registration.

2) Set my action to "User" but this do not permit to get the correct auto-generated password of the user being registering.

3) Do not apply condition

The problem is none of the 3 method fit my needs...

If I could be able to use method 1 and to set my condition for look for checkbox of user being registering with something such [user_cb_mycheckbox] this could be fine...but it seem not possible...

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: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233968 by krileon
Replied by krileon on topic Auto-Action: How to use different user ?
On the after registration trigger you should have User set to Automatic. The [password] substitution should be cleartext and working. I don't know what more to advise. If you have something storing the user object before CB Auto Actions can get to it then that'd explain why it's becoming encrypted. You can try pulling the password straight from post using [post_password] or accessing the user object directly with [var1_password].

If I could be able to use method 1 and to set my condition for look for checkbox of user being registering with something such [user_cb_mycheckbox] this could be fine...but it seem not possible...

You can access a triggers variables using var1, var2, etc.. please see the below tutorial to see what variables a trigger has.

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


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.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 1 month ago #233992 by dotcom22
Replied by dotcom22 on topic Auto-Action: How to use different user ?
Excellent !!! :silly: :woohoo: :lol:

Using [var1_password] work well but as I said not [post_password].

Sometime is not easy to understand all possibility we have with trigger and variable.

Many thank !!

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum