I have a page view with a menu tab and URL looks like my-site.com/user/%/my-view
I use return $argument == $GLOBALS['user']->uid;
for default argument.
And then I would like to limit the argument to only the currently logged-in user’s uid but how can I exclude admin role (uid=1)?
After reading this article I tried this but didn't work.
global $user;
if($user->uid != 1){
return $argument == $GLOBALS['user']->uid;
}
What I need to achieve is:
Admin role(uid=1) can see my-site.com/user/%/my-view
for all users but the rest of the users can see only the view according to their uid.