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

169 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jun 30
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits