1
DeeKay
uname in Blocks
  • 2004/1/24 18:39

  • DeeKay

  • Just popping in

  • Posts: 3

  • Since: 2004/1/24


Hi!
What is the variable of the logged in username called in blocks?
when I activate php and use this:
$uname=$xoopsUser->getVar("uname");

the whole site crashes. so certainly this doesn't work in blocks..
so how can I read the logged in username in the block.

thanks!

2
robekras
Re: uname in Blocks
  • 2004/1/24 19:09

  • robekras

  • Documentation Writer

  • Posts: 187

  • Since: 2002/12/10


You have to do the following:

global $xoopsUser;

$name $xoopsUser->getVar("uname");
echo 
"Username: $name";

Login

Who's Online

468 user(s) are online (313 user(s) are browsing Support Forums)


Members: 0


Guests: 468


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits