I am using CB 2.0 and CB Auto actions and I have a question.
I want to prevent an user to connect with another user if they have the value of the field "cb_field" so I used an autoactions with the trigger "Before add connection request". In the conditions tab I wrote "[cb:userdata field="cb_field" user="[var1]"/]" equals to "[cb:userdata field="cb_field" user="[var2]"/]". It does not work as expected and I do not understand why. I tried to solve the problem by testing the substitutions in a message and it shows the text [cb:userdata field="cb_field" user="524"/] and [cb:userdata field="cb_field" user="525"/]. I think I wrote something bad in the substitutions but I wrote the same thing than explained here :https://www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb
It is the exact same code and the ids are substituted well so I do not understand why this is not working.
I would be very grateful for any kind of help.
That's a substitution within a substitution. That won't work due the parsing order of substitutions in CB where extra substitutions (like [var1-10] usages) are parsed last. As neither of the triggers that fire before a connection is established contain a user object you'll only be able to condition off of one of the user objects as CB Auto Actions will likely try to load the id into a user object.
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.