CBSubs PostAfPro plugin except for staff

8 years 3 months ago #276628 by activha
Hi

We use CBSubs PostAfPro but would like to avoid triggering it for our staff people when they manually register payments with offline gateway from the front end.

Is it possible to avoid this plugin for staff level only ?
We have a "staff" access level above Registered Level

I did not see a setting in the plugin back end allowing this as in tabs settings

Please Log in to join the conversation.

8 years 3 months ago #276654 by krileon
Replied by krileon on topic CBSubs PostAfPro plugin except for staff
Nope, it functions strictly for frontend. Going through frontend on a users behalf is still seen as normal frontend behavior. There's no permissions beyond the plugins view access level for CBSubs PostAfPro.


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 to join the conversation.

8 years 3 months ago #276660 by activha
Replied by activha on topic CBSubs PostAfPro plugin except for staff
If I set a simple php rule in the plugin cbsubs.postafpro.php restricting access for our office IP will it work without breaking other things in CB of CB subs ?

Please Log in to join the conversation.

8 years 3 months ago - 8 years 3 months ago #276669 by krileon
Replied by krileon on topic CBSubs PostAfPro plugin except for staff
I don't know. Depends on how and where you make your edit, but an IF check in onCPayAfterPaymentStatusUpdateEvent to exclude moderators from affiliate tracking is probably easiest approach. The below should do this.

if ( \CBLib\Application\Application::MyUser()->isGlobalModerator() ) {
    return;
}

Post Affiliate Pro also may have a feature to exclude certain ip addresses.


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 to join the conversation.

8 years 3 months ago #276705 by activha
Replied by activha on topic CBSubs PostAfPro plugin except for staff
Got an error with these lines added in onCPayAfterPaymentStatusUpdateEvent :

Application::MyUser() called without a parameter

Please Log in to join the conversation.

8 years 3 months ago #276713 by krileon
Replied by krileon on topic CBSubs PostAfPro plugin except for staff
Change User() to MyUser(), sorry.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn