From 26ca2b6409485a3733f823df3fe760d38f448082 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 21 Dec 2015 20:17:36 -0800 Subject: [PATCH] Avoid CAS update errors on password reset This could be caused by double posts or hook conflicts. Bug: T95839 Change-Id: If362c8d0c9f9ded76b185cd717638b06775be885 --- includes/specials/SpecialPreferences.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.20.1