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

Callum Macdonald lists.automattic.com at callum-macdonald.com
Fri Oct 26 14:55:54 GMT 2007


Logging a user into WP via the cookie is relatively simple. Check out 
pluggable.php for the wp_setcookie() function.

Two cookies handle the login:
wordpressuser_MD5OFSITEURL
wordpresspass_MD5OFSITEURL

The user cookie takes the username in plain text, the pass takes a 
double md5 of the password (just md5 what's in the user db).

We're integrating WPMU login with another system, so we're writing our 
users to the wp user db then setting the cookies for WP. WP doesn't 
handle any login or logout functions.

Cheers - Callum.

[1] 
http://trac.wordpress.org/browser/trunk/wp-includes/pluggable.php?rev=6291#L458

Bertrand wrote:
> 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.
>
> B
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>



More information about the wp-hackers mailing list