I'm using this code inside a custom page:
So that admins and users inside a group 6 can access content of the page.
It works fine with my Admin profile, but I created a test profile which belongs to group 6 (additional) while his primary one is Registered and he gets the no permissions page. How can I fix this?
I will create mutliple custom pages in future and would be impossible to allow users to access only certain ones using primary groups. I don't understand why the "is_member" fucntion seems to check only primary group and not additional nes
<?php
if (is_member("4,6")){
} else {
error_no_permission();
}
?>
So that admins and users inside a group 6 can access content of the page.
It works fine with my Admin profile, but I created a test profile which belongs to group 6 (additional) while his primary one is Registered and he gets the no permissions page. How can I fix this?
I will create mutliple custom pages in future and would be impossible to allow users to access only certain ones using primary groups. I don't understand why the "is_member" fucntion seems to check only primary group and not additional nes