Last modified: 2011-04-14 15:14:37 UTC
we are using one AuthPlugin extension to provide unified accounts to our mediawiki site. The production server, using Mediawiki 1.5.8 works perfectly (http://docs.moodle.org), but we have found one problem when upgrading to Mediawiki 1.22.2 (http://docs.moodle.org/test):
First time users are properly validated and their information (username, email, real name) is copied perfectly to mediawiki tables.
But, non-first time users don't get this info updated (if they change it in the external DB).
I've been tracing a bit the problem and it seems that, in SpecialUserLogin.php, the processLogin() method only performs one $wgUser->saveSettings(); when there is one change in the "rememberpassword" option. And all the change performed by our AuthPlugin extension, and properly stored in $wgUser aren't saved at all.
Perhaps the $wgUser->saveSettings(); call should be out from the if? To be applied always the login is SUCCESS ?
I've assigned this to the "Special pages" component, because the bug is in one of them (SpecialUserLogin.php). Not sure if I should have used another component. Apologizes!
TIA and ciao, stronk7 :-)
Does it solve the problem if you toss in a $user->saveSettings() in your plugin?
that works. It's, in fact, the hack I've in our updateUser() method.
But it's supposed that both initUser() and updateUser() only have to modify $user and, by reference, be returned to SpecialUserlogin.php and saved from there. At least that's the way it used to work, and the way initUser() continues working now.
Ciao, stronk7 :-)
Can you please test this against MediaWiki 1.13 that was recently released, or even MediaWiki 1.14alpha (SVN HEAD)?
I've tested this against MediaWiki 1.13 and behaviour continues the same. $wgUser data coming from authentication extension isn't updated at all. It seems that the SpeciaUserlogin->processLogin() function hasn't been changed, so $wgUser->saveSettings() is not executed always.