Welcome to Geeklog Sunday, October 24 2021 @ 02:35 pm 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:

PHP Formatted Code

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

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

return $retval;
}

 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/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 02:35 pm.

  • 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