Auto action and change of username

7 years 4 months ago #288498 by activha
Auto action and change of username was created by activha
Hello Kyle

We use an auto action to sync with pap software and sync username and affiliate ref id.

We would like to authorize our users to change usernames now that alias has been implemented on CB

We used now Onafteruserupdate and Onafterupdateuser which worked well. However when changing usernames, the auto action cannot send the new username to the affiliate soft and then we loose the sync.

Can you suggest triggers to use when changing usernames, so that the sync can be done on other softwares logging with the old username and allowing then to perform an update ?

Hope it's clear enough :-)

Thanks
Jean

Please Log in to join the conversation.

7 years 4 months ago #288501 by krileon
Replied by krileon on topic Auto action and change of username
That trigger is fire for username change. What do you mean it can't send the username? You should be able to substitute it in with [username]. If you need the old username to update with the new username you can access the previous user object with var3 (e.g. [var3_username]).


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 #288522 by activha
Replied by activha on topic Auto action and change of username
Well we used :
[var1_password] not egal to [var3_password] with onAfterUpdateUser and onAfterUserUpdate and the php code executes correctly

With [var1_username] not egal to [var3_username] and the same triggers and code, nothing is executed, and the code auto action does not fire.

I have also tried with [username] not egal to [var3_username] , no results neither
Also tried elsewhere :
if ("[var3_username]" > 0) { $cbpapid = "[var3_username]";} else {$cbpapid = "[username]";}
but no results neither.

is var3_username existing when there is a change of username ?

I have the same question for email change.
As an email change must be confirmed by a link received by the user, when is the email really changed ? I mean when editing the profil for an email change AND a username change, you are returned to the profil edit page and you receive a link to confirm the email change. In this case, do we have still access to the var3_email when returning to the profil edit page ?

Can you help me on these ?
Thanks
Jean

Please Log in to join the conversation.

7 years 4 months ago #288563 by krileon
Replied by krileon on topic Auto action and change of username
Enable debug mode and maximum error reporting in Joomla global configuration. Once under edit your auto action and under Parameters turn on Debug. Now retest and it'll output if the action failed and if it's the conditions failing it'll display exactly what values it was trying to compare.

If you're using CB Reconfirm Email you won't be able to compare var1 and var3 for email changes as CB Reconfirm Email reverts it. You will need to use the trigger included with CB Reconfirm Email. More specifically reconfirm_onAfterConfirm, which is fired after they've confirmed the change.


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 #288567 by activha
Replied by activha on topic Auto action and change of username
Thanks for the trigger for reconfirm email, this was our problem I guess for email variable.

BTW is it possible to chain several conditions such as :
[var1_password] not egal to [var3_password]
OR
[var1_username] not egal to [var3_username]

Please Log in to join the conversation.

7 years 4 months ago #288574 by krileon
Replied by krileon on topic Auto action and change of username
There is no OR conditions. They are always AND. It's possible the ability to have OR conditions will be added in a later release. I suppose you could have a single condition as follows and see if it works.

[var1_username][var1_password] Not Equal To [var3_username][var3_password]


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.340 seconds

Facebook Twitter LinkedIn