1
ux9iy
User authentication
  • 2007/3/17 20:54

  • ux9iy

  • Just popping in

  • Posts: 2

  • Since: 2007/3/17


I want to "borrow" the user authentication that XOOPS provides. This is what I managed to find out. I need to know if this is *RELIABLE* or not:

1. PLACE YOUR NEW PHP FILE SOMEWHERE IN XOOPS INSTALL BASE
2. FILE CONTAINS:

include_once 'mainfile.php';
if (isset ($xoopsUser))
{
$uname = $xoopsUser->getVar('uname');
// USER IS AUTHENTICATED, AND $uname IS THEIR USER NAME
}

3. Use $uname as the authenticated user name since you can "trust" that they have logged in correctly.

Note that this *seems* to work fine, I just want to know if the magic variable $xoopsUser is reliable.

Login

Who's Online

394 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 394


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