By halisemre on
I have a code in comment.tpl as print $links
I want to show the link if only userid==1
I tried something like this but it did not work
global $user;
if ($userid == "1") print $links I would appreciate some feedback
Comments
try $user->uid == 1
try
$user->uid == 1
...
good luck.
thanks this did the job
thanks this did the job
Multiple users
Hi There,
I know this is an old post but just after a little help.
I am also trying to display a block to multiple userid's and using:
if ($user->uid == 1)
Question - how would I change this to add in multiple users:
i.e.
if ($user->uid == 1, 2, 3, 4, 5 etc)
Any help appreciated!
Regards
JD
^
The easiest way, I think, is in_array().
What's new and changing in PHP 8.4