1
alainjean
Re: Successful PAM authentication module
  • 2004/9/7 8:58

  • alainjean

  • Just popping in

  • Posts: 1

  • Since: 2004/9/7 8


Hello folks,

OK, I'm the 'bad system administrator' whom Sunita was referencing in messages here about plugging in PAM authentication in XOOPS (OK, OK, she never actually wrote that

I've taken over finishing this project because she didn't have the resources to implement the session logging that I asked her to implement (and to reply to another post on the topic, I don't think it can be implemented by tweaking the PAM configuration... yes, it could be clearner to do this by adding the needed code to the pam_auth PHP module, but well, I chose to modify the PHP code at this point).

So I've been hacking into your authentication modules. I've found out that the logoutUser() function might be missing a:

global $xoopsUser;

line so that it can access this object in the code further down:
if (is_object($xoopsUser)) {
...

Seems to me that this test always fails and as a side effect entries are never taken out of the online users table in the DB... or am I misled?

I needed to dig out the current username to build the syslog logout message, so I had to call $xoopsUser->getVar('uname') from within the logoutUser function. It seems that $xoopsUser is always undefined. I'm no object-oriented PHP guru by far, but the 'global' statement made the trick here.

Just for what it's worth.
Greets,
_Alain_




TopTop



Login

Who's Online

185 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 185


more...

Donat-O-Meter

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

Latest GitHub Commits