XF 2.1 Hide content for specific users

Roka

Well-known member
Hello I build the add-on for hide contnet and on option page i have two fields
First exclude user-groups and value is 2,3,4...(coma separate)
Second exclude specific user (e.x 1,12,22) - this is user ID (coma separate).

For hide specific user-group i use and work:
Code:
foreach ($groupIds as $id) {
                if ($this->isMemberOf($id)) {
                    $hide = TRUE;
                    break;
                }
            }

But how to hide for users inserted in 2-nt filed?

Hide for users with id 1,3,5,7 (this id's are inserted id field)

Thanks
 
Top