Skip to Content Skip to Menu

I have difficulties in using the Auto Action Plugin

2 days 18 hours ago #342075 by erichburkhard
My context:
Joomla: 5.3.3
CB:       2.10.0+build.2025.06.20.17.23.51.16c1e1cee

How it works at the moment:
The registration process of any user of my website can be completed without the help of any moderator. ONLY the uploaded avatar picture of these users has to be APPROVED by the moderator.

What I want to do:
Users shall be enabled to invite other users. As soon as a certain user has invited 3 other users (at minimum), which have completed their registration process and who all have an APPROVED avatar picture (by the moderator) they shall get a certain subscription for free (based on an exiting plan)

Which plugins do I neet for this
- Invites
- Auto Action 

My idea / concept to achieve this
After thinking about this i have the idea to create 2 Auto actions:

Auto Action 1:
1.1 Trigger-Event is the APPROVAL of a users avatar by a moderator via frontend.
1.2 The Condition is to check if the user (of the approved image) has an inviter (check will be done via SQL on the invites db table ...) 
1.3 The action is to increment a NEW added field in the inviters profile (+1)

Auto Action 2:
2.1 Trigger-Event is that the field (--> 1.3) has been updated
2.2 The Condition is the check if this field has value = 3
2.3 The action is to create a new subscription based on a certain Plan

Question 1:
Do you think this concept with these 2 Auto Actions makes sense or is there something 'easier' or more elegant?

Question 2:
At the moment I need some help with 1.1. (the points 1.2 - 2.3 are not in the focus at the moment) My main problem is that I do not find the correct trigger or may be I also 'work' with the wrong user (because there is a user for the moderator an a user for the user profile to which the avatar image belongs)

Below the screenshots of  my trial for 1.1 (I have left the Condition tab empty for the moment)

 

 

so could you help me with this?

regards

 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49614
  • Thanks: 8488
  • Karma: 1465
2 days 15 hours ago #342100 by krileon
Ok, so if I understand this correctly you want user avatar approval to be automated as long as they've invited 3 other users? What's the expected behavior if they haven't invited 3 other users? That they would require manual moderator approval?


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.

1 day 21 hours ago #342108 by erichburkhard
Replied by erichburkhard on topic I have difficulties in using the Auto Action Plugin
Not exactly - let me explain in detail.

The current implemented workflow behaviour (with no possibility of invitation) is as follows:

Rule 1:
Users are able to register themselves. The only (user)data that has to be approved separately by a moderator is the uploaded avatar picture (which is mandatory at registration time). If the moderator declines the avatar image, the corresponding user will be informed that he has the option to upload a new avatar again which has to be approved again by the moderator. But the registration of the user itself remains untouched and valid, independent of an approved avatar image or not.
At the end of this avatar approval process (which can be repeated infinitely) the user remains still registered but in case that his avatar foto has not been approved successfully by the moderator his avatar picture remains 'empty' if you select his profile. AND as a consequence for such a user with an 'empty' avatar image: He is not able to see the avatars or gallery fotos of other profiles (e.g. selectable via userlists)


The future workflow behaviour (with possibility of invitations) shall be as follows:

Rule 1:

as described above remains the same

Rule 2 (NEW):
A (not registered) user gets an email or registration link as invitation. Now this invited person is going to register himself via this email/link. The registration process itself and the avatar approval works as described in Rule 1

Rule 3 (NEW)
Any inviter of other users gets rewarded with a a certain subscription(plan) under the following conditions:
- Rule 3.1 The inviter has invited minimum 3 other users which complete the registration process via email or link
- Rule 3.2 The corresponding avatar image of (minimum) 3 registered users  (according to Rule 3.1) have to be approved positively by the moderator (as described in Rule 1)

Hope this description is better

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49614
  • Thanks: 8488
  • Karma: 1465
1 day 17 hours ago #342113 by krileon

Rule 2 (NEW):
A (not registered) user gets an email or registration link as invitation. Now this invited person is going to register himself via this email/link. The registration process itself and the avatar approval works as described in Rule 1

Ok, you don't need to do anything special forthis as CB Invites already covers that process.

Rule 3 (NEW)
Any inviter of other users gets rewarded with a a certain subscription(plan) under the following conditions:
- Rule 3.1 The inviter has invited minimum 3 other users which complete the registration process via email or link
- Rule 3.2 The corresponding avatar image of (minimum) 3 registered users (according to Rule 3.1) have to be approved positively by the moderator (as described in Rule 1)

Ah, I understand. That might be a bit complicated for Rule 3.2. Rule 3.1 is easy enough since there's events for an invite being accepted, but there's no trigger for when a moderator approves an avatar upload. So I'm not sure when would be best to check for that since you'd need to check for those conditions at some other point. Is there really a need for the avatar upload approval for this part of the feature?


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.

1 day 15 hours ago #342124 by erichburkhard
Replied by erichburkhard on topic I have difficulties in using the Auto Action Plugin
Q: Is there really a need for the avatar upload approval for this part of the feature?


A: The idea behind Rule 3.2 is as follows: The registration of an invited person is more valuable if there is an approved avatar picture. My idea: If there is no 'direct' trigger for this approval-(field) , may it eventually be possible to do this in two steps? E.g.:

     Trigger: I think the 'click' on the (Image)Approval-Button by the moderator will change the user object .... and this 'change' should?!? fire a certain trigger.. so may be there is a trigger like: onAfterUpdateXY  /
     onAfterSaveXY / etc. ?

     .... of course: After this trigger has been fired you only know that the user object has been updated, but you don't know which field(s) has been updated. For this to find out we use a condition:

     Condition: By the help of a condition we check if the field which stores the status of the approval of the avatar (I don't know the exact name ... may be 'avatar_approved' (Boolean)) is TRUE .... 

     So if we combine the above Trigger and the Condition we know that a moderator has approved the avatar of a certain user...

      so do you think this is possible that way?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49614
  • Thanks: 8488
  • Karma: 1465
1 day 15 hours ago #342125 by krileon
The image approval page does not fire any triggers. There's only a trigger for before/after upload of the actual image. There is no trigger for what you're wanting to do. The only way to really do this is something more heavy like checking it on every login or using a batch process and checking it regularly with CRON. Personally I'd remove the requirement to have 3 invited users with approved avatars and just act on accepted invites.


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