Auto action and change of username

7 years 4 months ago #288643 by activha
Replied by activha on topic Auto action and change of username
Ok that's fine for username and password, your condition works very well, thanks !

But for email change, we have a problem with the trigger.
We use reconfirm_onAfterConfirm with user automatic for everybody, no conditions, and we need to access [email]
the auto action with this trigger does not fire
do we need to add references, reload user object, use another substitution ?

Please Log in to join the conversation.

7 years 4 months ago #288647 by krileon
Replied by krileon on topic Auto action and change of username
The reconfirm_onAfterConfirm trigger doesn't provide the same variables as onAfterUpdateUser. Its variables are as follows.

[var1] = user object
[var2] = reconfirm object (has new and old email address, see __comprofiler_plugin_emails table)
[var3] = reconfirm code

do we need to add references, reload user object, use another substitution ?

No, but you can try [var1_email] I suppose.


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 to join the conversation.

7 years 4 months ago - 7 years 4 months ago #288652 by activha
Replied by activha on topic Auto action and change of username
But if I need to access other substitutions like [cb_refid] for instance, should I use [var1_email] and reload user object for [cb_refid] ?

I have some difficulties with this one

Accessing [var1_email] gives the old email address, so is this [var2_to] or [var2_email] to get the new email after reconfirmation ?

Please Log in to join the conversation.

7 years 4 months ago - 7 years 4 months ago #288658 by krileon
Replied by krileon on topic Auto action and change of username
Acting on reconfirm_onAfterConfirm should not give the old email address. The user object has been updated at that point. If not try reload user to see if that solves it, but you shouldn't need to. You can also access the email addresses as follows for that trigger.

Old:
[var2_from]
New:
[var2_to]

For other fields just use normal substitutions or access var1 directly.


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 to join the conversation.

7 years 4 months ago #288670 by activha
Replied by activha on topic Auto action and change of username
Thanks a lot, got it with [var2_to]
For info do you always follow var_database_field as a notation in CB ?

This will answer to lots of questions ;-)

Please Log in to join the conversation.

7 years 4 months ago #288673 by krileon
Replied by krileon on topic Auto action and change of username

For info do you always follow var_database_field as a notation in CB ?

Not necessarily. If it's a database object then yeah its variables should match the table, but the variables sent with a trigger aren't always database objects.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.210 seconds

Facebook Twitter LinkedIn