Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/250024
Change subject: Avoid calling User::setPassword() on users not in database
......................................................................
Avoid calling User::setPassword() on users not in database
MediaWiki core change Id3d4074 is removing the ability to call
$user->setPassword() before the user is added to the database. This change
updates the extension to avoid such calls. It remains backwards-compatible with
older versions of MediaWiki through adding a saveSettings() call when
necessary.
Change-Id: I2c18f4831be42bc27549f4f98915753a1a82391d
---
M TranslationNotificationJob.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslationNotifications
refs/changes/24/250024/1
diff --git a/TranslationNotificationJob.php b/TranslationNotificationJob.php
index fb90c37..02ad696 100644
--- a/TranslationNotificationJob.php
+++ b/TranslationNotificationJob.php
@@ -70,8 +70,8 @@
// If user doesn't exist
if ( !$user->getId() ) {
- $user->setPassword( $wgNotificationUserPassword );
$user->addToDatabase();
+ $user->setPassword( $wgNotificationUserPassword );
$user->saveSettings();
// Increment site_stats.ss_users
$ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 );
--
To view, visit https://gerrit.wikimedia.org/r/250024
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c18f4831be42bc27549f4f98915753a1a82391d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits