Last modified: 2011-04-14 15:14:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15963, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13963 - SpecialUserlogin.php only save settings if there is a change in rememberpassword
SpecialUserlogin.php only save settings if there is a change in rememberpassword
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.11.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://docs.moodle.org/test
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-05 22:08 UTC by Eloy Lafuente
Modified: 2011-04-14 15:14 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Eloy Lafuente 2008-05-05 22:08:02 UTC
Hi,

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 :-)
Comment 1 Brion Vibber 2008-05-07 02:16:43 UTC
Does it solve the problem if you toss in a $user->saveSettings() in your plugin?
Comment 2 Eloy Lafuente 2008-05-09 02:19:25 UTC
Hi Brion,

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 :-)
Comment 3 Siebrand Mazeland 2008-08-18 00:20:02 UTC
Can you please test this against MediaWiki 1.13 that was recently released, or even MediaWiki 1.14alpha (SVN HEAD)?
Comment 4 Eloy Lafuente 2008-08-21 16:15:32 UTC
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.


Ciao :-)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links