[SOLVED] How to get the subscription type in code level!
- richard_zhuzhen
- OFFLINE
- Posts: 15
- Thanks: 0
- Karma: 0
Thanks a lot!
Please Log in or Create an account to join the conversation.
- nant
- ONLINE
- Posts: 25532
- Thanks: 1834
- Karma: 877
richard_zhuzhen wrote: I need the code to judge what kind of subscription the user sign in.
Thanks a lot!
Please give more details as I am not sure what you are asking?
--
Nick (nant)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
For more add-ons and support: Upgrade your membership
Links: Community Builder - Languages - Adv/Pro/Dev membership - CBSubs Paid Subscriptions - GPL Templates - Hosting
Visit my CB Profile - Send me a Private Message (PM)
Please Log in or Create an account to join the conversation.
- richard_zhuzhen
- OFFLINE
- Posts: 15
- Thanks: 0
- Karma: 0
For example: $cbUser =& CBuser::getInstance( $_CB_framework->myId() ); //This code told me how to get the instance of CBuser, so I can get all the property of the instance like username, usergroup etc.
By the way, are there any documents to describe the API of cb and cbsub.
Regards!
Please Log in or Create an account to join the conversation.
- krileon
- ONLINE
- Posts: 68609
- Thanks: 9109
- Karma: 1434
CB API documentation can be found in the free downloads section at the below link.
www.joomlapolis.com/downloads/cat_view/77-free-member-download-area
In addition to the above you can find some API examples and usages on my site from the tutorials section at the below link.
www.allmysocials.com/directory/tutorials
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.
- richard_zhuzhen
- OFFLINE
- Posts: 15
- Thanks: 0
- Karma: 0
Please Log in or Create an account to join the conversation.
- nant
- ONLINE
- Posts: 25532
- Thanks: 1834
- Karma: 877
richard_zhuzhen wrote: In my project I intergrated sobi2 component with CB and CBsub. But I wish to customerize the sourcecode of sobi2 because some function has relationship with the user's subscription type. So I need to judge what kind of subscription the user log in. Can you give me the example sourcecode(PHP) about how to do this.
For example: $cbUser =& CBuser::getInstance( $_CB_framework->myId() ); //This code told me how to get the instance of CBuser, so I can get all the property of the instance like username, usergroup etc.
By the way, are there any documents to describe the API of cb and cbsub.
Regards!
You can use existing CBSubs / CB integration to set a CB field value to indicate the active subscription (can be one checkbox field per subscription). Then you can use existing CB API to check this value in a new SOBI CB plugin?
--
Nick (nant)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
For more add-ons and support: Upgrade your membership
Links: Community Builder - Languages - Adv/Pro/Dev membership - CBSubs Paid Subscriptions - GPL Templates - Hosting
Visit my CB Profile - Send me a Private Message (PM)
Please Log in or Create an account to join the conversation.