Posted by jnicola on August 14, 2009 at 1:39am
Hey everyone,
I'm doing some custom theme-ing. I've found it extremely useful to be able to place "edit this image" above images in image galleries for content administrators. In drupal 6 I've been placing the code in node.tpl.php and and saying is user != 0 then display the edit div. Since only content admins are users, it's a safe methodology.
Anyways, I can't seem to find the variable in drupal 5. $uid is constantly set at 1 for some god awful reason, and $user->uid doesn't work either!
Thanks everyone,
Jesse

Comments
global $user;?
$user->uid is what I use all the time, though you have to include the line "global $user;" first.