Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 08:31 am EDT

Geeklog Forums

cant get $uid


geekuskhan

Anonymous
I am trying to write a custome block. But I cant seem to get the $uid into my function. check this out:

Text Formatted Code

#start online tools function
function phpblock_onlineTools($uid){

$retval .= "test = " . $uid;

return $retval;
}

 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The PHP blocks don't get any parameters.

Refer to the global variable $_USER['uid'] for the user id (and note that it can be empty or 1 for anonymous users).

bye, Dirk
 Quote

All times are EDT. The time is now 08:31 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content