WPMW

WPMW Commit Details

Date:2009-04-29 09:34:13 (5 years 5 months ago)
Author:Ciaran Gultnieks
Branch:master
Commit:20174acfed1cda55319e32deb758dcffcd9e8d43
Parents: f6a0db7d2120a5821955e0bb09531a360a0dd882
Message:Moved include of registration.php - fixes a problem that occurs if a new admin-created user logs into MediaWiki without ever having logged in to WP

Changes:
MAuthWP.php (2 diffs)

File differences

AuthWP.php
2222
2323
2424
25
2526
2627
2728
......
158159
159160
160161
161
162162
163163
164164
// able to handle everything as if Wordpress was doing it natively
// including respecting any plugins that might be in place.
require($WP_relpath.'/wp-load.php');
require($WP_relpath.'/wp-includes/registration.php');
// Wordpress has escaped all these in wp-settings.php - we need to
// unescape them again if they weren't meant to be escaped.
// MediaWiki API HANDLER
// Add a user created in MediaWiki to the Wordpress database...
function addUser($user,$password) {
require_once($WP_relpath.'/wp-includes/registration.php');
wp_create_user($user->mName,$password,$user->mEmail);
return true;
}

Archive Download the corresponding diff file

Branches