function isUser($type, $users_id) { if (isset($this->users[$type])) { foreach ($this->users[$type] as $data) { if ($data['users_id'] == $users_id) { return true; } } } return false; }