From: Aaron Schulz Date: Tue, 22 Dec 2015 04:17:36 +0000 (-0800) Subject: Avoid CAS update errors on password reset X-Git-Tag: 1.31.0-rc.0~8528^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22upgrade%22%2C%22reinstall=non%22%29%20.%20%22?a=commitdiff_plain;h=26ca2b6409485a3733f823df3fe760d38f448082;p=lhc%2Fweb%2Fwiklou.git Avoid CAS update errors on password reset This could be caused by double posts or hook conflicts. Bug: T95839 Change-Id: If362c8d0c9f9ded76b185cd717638b06775be885 --- diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 49ab6d5e98..b45946f10f 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -128,7 +128,7 @@ class SpecialPreferences extends SpecialPage { throw new PermissionsError( 'editmyoptions' ); } - $user = $this->getUser(); + $user = $this->getUser()->getInstanceForUpdate(); $user->resetOptions( 'all', $this->getContext() ); $user->saveSettings();