[wp-hackers] Single sign-on with Wordpress & Mediawiki

Travis Snoozy ai2097 at users.sourceforge.net
Mon Oct 29 01:12:00 GMT 2007

On Sun, 28 Oct 2007 17:33:06 -0700, "Sneaks" <0vcqn5q02 at sneakemail.com>

> most of this thread has just been about merging tabular user data,
> but my original question was about getting other applications in the
> same site to recognize that a user was already authenticated inside 
> application X.

(from the initial message)
> Anyone have any idea how to share cookies from WP to Mediawiki? I
> know there's lots of work out there to share db tables, but I don't
> want users to have to sign in twice.
> The ideal would be that Mediawiki reads the cookies from WP, but I
> don't know how many side effects this would have.

I'm aiming in the same direction you are -- a single chunk of code
that will say "you're logged in" or "you're not logged in" for the
entire site. However, it would be application agnostic (e.g., you
could log into Mediawiki or WordPress, but logging into would would
automatically log you into the other), so it's not sharing any
applicatin-specific cookies.

That said, you could very likely get WordPress running off the
MediaWiki cookie if it contains the username; just check the
MediaWiki cookie and call wp_set_current_user() from a plugin. I don't
know about getting MediaWiki to run off the WordPress cookie, because
you'd be changing MediaWiki code at that point (you shouldn't have to
change WordPress at all). The usernames would still need to exist in a
synced or shared table in both cases, but I assume you have this taken
care of.


In Series maintainer
Random coder & quality guy

More information about the wp-hackers mailing list