PEAK XOOPS - Auto Login for 2.2 and session id in englishin japanese

Auto Login for 2.2 and session id

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/4/8 0:55
jseymour  ¾åÅùʼ From: Gainesville Florida, USA  Posts: 40
This is not necessarily a bug, but an annoyance. I am using the XOOPS 2.2 autologin hack on XOOPS 2.2.4 and it does work well. The only thing is it shows a PHP session id in the URL (on initial autologin) when I have the "session.use_trans_sid" set to off.

Is there anyway to adjust the hack so it does not do this?
Votes:10 Average:8.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/4/8 5:23
GIJOE  ÀèǤ·³Áâ   Posts: 4110
It sounds a problem.

Quote:
The only thing is it shows a PHP session id in the URL (on initial autologin) when I have the "session.use_trans_sid" set to off.

Is it not a typo off->on ?

If PHP session id displayed in URL with "session.use_trans_sid off", tell me the version of PHP.
Votes:6 Average:8.33
Previous post - Next post | Parent - Children.1 | Posted on 2006/4/8 6:57
jseymour  ¾åÅùʼ From: Gainesville Florida, USA  Posts: 40
No I have it set to off. And it is registered as off in protector.

My PHP version is 4.4.2.
Votes:5 Average:8.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/4/9 6:01
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Do you use custom session?
Votes:5 Average:8.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/4/9 8:29
jseymour  ¾åÅùʼ From: Gainesville Florida, USA  Posts: 40
No custom sessions are off. The session id only shows at initial login, after that any page does not show the session id.

But after a period of idle time and you refresh the site you will get a login redirect (or even a login button sometimes) and the session id is again in the URL.

Hope I am making sense, You can test it at www.tutorialmasters.com.

Thanks.
Votes:6 Average:6.67
Previous post - Next post | Parent - No child | Posted on 2006/4/9 23:03
GIJOE  ÀèǤ·³Áâ   Posts: 4110
OK. I've just found.

The session_id is added by redirect_header() in the core.
Thus, I have to modify the hack like this:

line 590 in include/autologin_main.php
	    // RMV-NOTIFY
	    // Perform some maintenance of notification records
	    $notification_handler =& xoops_gethandler('notification');
	    $notification_handler->doLoginMaintenance($user->getVar('uid'));

		$_COOKIE[ session_name() ] = session_id() ;
	    redirect_header($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')));
	} else {

The archive will be updated tomorrow.

Thank you for reporting, jseymour!
Votes:10 Average:6.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!