Thank you very much for taking care of ACL propagation on the active session. I'm trying to think on a work-around around about this.
So, please let answer my last question.
I'd would like to implement a sort of subscription coupon (password protected) to let some user to get the same subscription (plan1) of normal paid plan (plan1).
In others words: when a registred user on Community Builder, fills the "coupon form" (coupon-code and password are stored in a custom table and the correspondence is cheked by a php script), then the user should get the same subscription plan than other paying users (plan1).
I'm trying to implement this using two custom modules included in two joomla articles (using loadposition wrapper): the first article-module contains the form, the second article-module contains the php script to update database and it contains the confirmation message for the user.
To do this I have to update several tables, making a lot of queries checks to avoid double entries:
jom25_cbsubs_subscriptions (new line insert)
jom25_comprofiler (to update the field 'usertype')
jom25_groupjive_users (new line insert)
jom25_groupjive_notifications (new line insert)
jom25_user_usergroup_map (new line insert)
jom25_cbsubs_notifications (new line insert) probably I don't need this
jom25_cbsubs_history (new line insert) probably I don't need this
Do you have better way to achieve this? For example with some cbsubs plug-in I don't know yet?
You should be able to just use the CBSubs Promotion coupon. You can supply a field on registration for them to provide the password for that coupon and have the password checked in the conditions of that coupon. Do not use direct queries to insert users, subscriptions, etc.. it often will not work as normal internal code will not fire for that new user.
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.