From 6f61893400acb047b608297ebf320aa18c71e2ff Mon Sep 17 00:00:00 2001 From: daniel Date: Sat, 6 Aug 2016 18:44:08 +0200 Subject: [PATCH] Don't force loading of groups and options on User::loadFromUserObject When copying state from one User object to another, don't force the source object to be initialized. The target object can initialize groups and options on demand as usual. Among other things, this helps to avoid some cases of recursive calls to User::load(), see I6d1b9fe0789b4. Bug: T142295 Bug: T137051 Change-Id: Ib369cf5b00628550591c2ee5dcb195db7c59a59c --- includes/user/User.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/user/User.php b/includes/user/User.php index 8d3fcea18b..181ff46485 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1387,8 +1387,6 @@ class User implements IDBAccessObject { */ protected function loadFromUserObject( $user ) { $user->load(); - $user->loadGroups(); - $user->loadOptions(); foreach ( self::$mCacheVars as $var ) { $this->$var = $user->$var; } -- 2.20.1