1
myrth
getting username?
  • 2004/6/5 23:22

  • myrth

  • Just popping in

  • Posts: 6

  • Since: 2004/5/30


i cannot, for the life of me, retrieve the username within a custom block.

i've tried :

require('header.php');
$uname = !empty($xoopsUser) ? $xoopsUser->getVar('uname','E') : 'abc';
echo $uname;

and i seem to always see 'abc'.

any chance someone can help me out a bit? :)

thanks.

-myrth

2
Dave_L
Re: getting username?
  • 2004/6/6 0:13

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


global $xoopsUser;
$uname is_object($xoopsUser) ? $xoopsUser->getVar('uname','E') : 'abc';
echo 
$uname;

3
myrth
Re: getting username?
  • 2004/6/6 0:36

  • myrth

  • Just popping in

  • Posts: 6

  • Since: 2004/5/30


dude, you are some kind of cool!

thanks. :)

-myrth

Login

Who's Online

414 user(s) are online (296 user(s) are browsing Support Forums)


Members: 0


Guests: 414


more...

Donat-O-Meter

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

Latest GitHub Commits