wiki02 is the cookie prefix that's taken into account explicitly so you
don't need to set it explicitly when calling getCookie(). However,
MediaWiki already uses that cookie to set RequestContext's user, you MUST
NOT redo authentication yourself.
On Wed, Apr 1, 2015 at 11:24 AM, Frank Baxmann <service(a)frankbaxmann.de>
wrote:
Hi all,
I tried to get a cookie in an extension like this:
$request = RequestContext::getMain()->getRequest();
$cookie = $request->getCookie ( 'wiki02UserName' );
wfDebugLog( "wad", print_r($cookie,true), false );
but $cookie empty, even if print_r of $request shows all Cookies:
2015-04-01 18:20:40 vm-debian7-server2 wiki02:WebRequest Object
(
[data:protected] => Array
.
.
.
[headers:protected] => Array
(
[HOST] => wiki02
.
.
.
[COOKIE] => ui-tabs-1=0; ui-tabs-2=0; wiki02UserID=1;
wiki02UserName=Root; wiki02Token=bc16d37ee81625c62......
Has anyone an idea what I missed?
Greetings
Frank
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
--
Best regards,
Max Semenik ([[User:MaxSem]])