[Mediawiki-l] Session longevity

paul.edmondson at fifeventures.co.uk paul.edmondson at fifeventures.co.uk
Wed Jun 27 10:38:27 UTC 2007


Hello All,

On an installation of mediawiki that we are running I've been tasked  
with trying to get mediawiki to keep users logged in over a larger  
period of time and across browser restarts.   After poking around the  
code I think I can do this by increasing the lifetime of the session  
cookie by using session_set_cookie_params.

However in GlobalFunctions.php, wfSetupSession calls  
session_set_cookie_params like this:

session_set_cookie_params( 0, $wgCookiePath, $wgCookieDomain );

I can of course change this line to add in a lifetime value.  However  
I find changing core code always causes problems when updating or  
patching.

My question is:  Do you think it will be possible in a future release  
of MediaWiki to add a $wgCookieLifetime configuration variable that  
can be used in session_set_cookie_params.  The default value in  
DefaultSettings.php can be set to 0 and then can be overridden in  
LocalSettings.php if required.

Thanks,


Paul.






More information about the MediaWiki-l mailing list