1
jwaldrup
XOOPS Bonding Hack
  • 2008/12/3 16:22

  • jwaldrup

  • Just popping in

  • Posts: 5

  • Since: 2008/7/31


The modules I am adding to my XOOPS site connect to another database to pull their data. Everything in that database is referenced by a 'RepNumber'. I need to set that RepNumber as a session variable. I map it by the XOOPS user email, which are common fields in the 2 databases. Where is the best place to do this? I have the bonding code in the /include/checklogin.php file now, but it seems that the variable is missing at times based upon how I enter the site. Where is the best place to place my bonding code for this?

2
trabis
Re: XOOPS Bonding Hack
  • 2008/12/3 18:47

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


include/common.php is loaded in almost every page.

3
jwaldrup
Re: XOOPS Bonding Hack
  • 2008/12/3 20:31

  • jwaldrup

  • Just popping in

  • Posts: 5

  • Since: 2008/7/31


Ok, thanks. What would be the best way to get the XOOPS user email address from there?

4
trabis
Re: XOOPS Bonding Hack
  • 2008/12/3 21:05

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You can place your code just before the ending tag ?>
if (is_object($xoopsUser)) {
   
$user_email $xoopsUser->getVar('user_email');
}

?>

Login

Who's Online

430 user(s) are online (64 user(s) are browsing Support Forums)


Members: 0


Guests: 430


more...

Donat-O-Meter

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

Latest GitHub Commits