1
Azpilot2211
Extracting Username for use in custom pages
  • 2005/11/17 12:41

  • Azpilot2211

  • Just popping in

  • Posts: 1

  • Since: 2005/11/17


Not sure if this goes here or not..
I am looking for a way to extract the username from XOOPS to include in a custom php page.
After some tweeking, what i came up with will print out the current user just fine using c-jay content. but when trying to pass thevariable $name to a custom php page, it doesnt seem to work. Are there any better ways of grabbing the current users name from xoops?

define('XOOPS_ROOT_PATH''/home/xoops');;
include 
'/home/xoops/header.php';
$mdm $xoopsUser->getVar('uname');
$name $mdm;
echo 
$name;
?>


thanks :)

2
LazyBadger
Re: Extracting Username for use in custom pages

RTFM! Learn XOOPS-smarty variables, and ask site's admins "Where docs, dudes?"
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

3
zyspec
Re: Extracting Username for use in custom pages
  • 2005/11/17 15:46

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


I believe you'll need to add the following before the ?> in your code:

include(XOOPS_ROOT_PATH."/footer.php");

or perhaps in your installation you'd want

include '/home/xoops/footer.php';


This lets XOOPS actually post the page.

4
alex1182
Re: Extracting Username for use in custom pages
  • 2005/11/27 4:43

  • alex1182

  • Just popping in

  • Posts: 20

  • Since: 2005/11/21



Login

Who's Online

330 user(s) are online (116 user(s) are browsing Support Forums)


Members: 0


Guests: 330


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