Skip to Content Skip to Menu

SQL Action 1

7 years 4 months ago #294758 by matthewdavey
Replied by matthewdavey on topic SQL Action 1
For a test user
I have the Login / Logout actions user connected on a subs subscription plan set up to on activation and deactivation , which I have allready programed BUT I NEED a trigger or auto action to delete user from CBuilder backend somehow after a idel time period like a 1 hour for the subs SQL action to fire. and delete users mosets listings.

What action allows any action you want to act on subscription activation and deactivation.

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48448
  • Thanks: 8280
  • Karma: 1443
7 years 4 months ago #294770 by krileon
Replied by krileon on topic SQL Action 1
CB Auto Actions is not a scheduler. There is no trigger in CB that fires every hour or anything of the sort. You'd need to setup an action to delete the user and run it every our using CRON. There is no action for deleting a user as it's considered dangerous. You'd have to use a Code action with Method set to PHP and use API to delete the user.

What action allows any action you want to act on subscription activation and deactivation.

Don't understand your question. An action doesn't care what trigger you use. For subscription activation and deactivation you can use the below with whatever action you like.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A

Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A


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.

7 years 4 months ago #294800 by matthewdavey
Replied by matthewdavey on topic SQL Action 1
How do you that is that hard?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48448
  • Thanks: 8280
  • Karma: 1443
7 years 4 months ago #294819 by krileon
Replied by krileon on topic SQL Action 1
How do you do what? Fire an action from CRON? Don't select a trigger (leaving it as None) then use CRON to schedule a GET request to the auto actions URL under the Global tab. There's also the Internal Users and Internal General triggers, which when using the Internal Users URL or Internal General URL found within CB Auto Actions > Parameters will run any auto actions with those respective triggers with Internal Users looping every user on your site (careful with that one).


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