*

lbsib

  • **
  • 17 posts
Hello,

I'm trying to show the osp_user_limit_message in the dashboard only when the user is not in certain groups.
In my case I have 4 groups (IDs 1-4) and I want to show it only when the user is in group 0 or 1.

I tried editing the functions.php of osclass pay but it didn't work, maybe it is the wrong section. This is the code that I used:
Line 675
Code: [Select]
function osp_user_limit_message() {
$group = ModelOSP::newInstance()->getUserGroupRecord(osc_user_id());
  if(osc_get_osclass_location() == 'user' && (osc_get_osclass_section() == 'dashboard' || osc_get_osclass_section() == 'items')) {
    if(osp_param('groups_limit_items') == 1 && $group['pk_i_id'] > 2){


Can someone tell me what I'm doing wrong here?

Thanks for your help.

*

MB Themes

Use:
osc_logged_user_id()

Instead of:
osc_user_id()
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots