I know this is a stupid question, but for the life of me, I just can't find the answer. I created a "user dashboard" which adds a tab to users' profiles. However, I don't want everyone to see everyone else's Dashboard! So I want the dashboard view to only display (even the menu tab!) if the current user equals the user argument.

How do I do that??

Comments

tevih’s picture

Ok.. I've been trying to figure this out, and I was thinking I cold do PHP validation...? Can someone help? I'm not a coder. Am I on the right track?

merlinofchaos’s picture

Status: Active » Fixed

Yes, this is the right track. In fact I think there is already an argument validator for this.

Use this code:

  global $user;
  return $argument == $user->uid;

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.