(bug 40340) Fix cache issues with changing user groups
authorTimo Tijhof <ttijhof@wikimedia.org>
Wed, 19 Sep 2012 00:24:35 +0000 (02:24 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 28 Dec 2012 14:35:49 +0000 (14:35 +0000)
commit2549c49562272d25a4cca07c11ad6ba6a3cf1968
treef6e2ee95112f9395b246fb5dd1b577ba7d3e0ca4
parent0086df3c586cf192d51e10d6e4fb860ee2b743a4
(bug 40340) Fix cache issues with changing user groups

* migrateUserGroup.php: Call User::invalidateCache

* While at it, also fix the issue where User::clearInstanceCache
  did not clear cache for User::getGroups.

  Although it does clear the caches of methods used to calculate
  other group-related lists (such as User::getEffectiveGroups),
  the one for the query from user_groups was still cached in
  $this->mGroups.

  Presumably this was forgotten when this pattern was introduced
  as the instance cache precedes the user_group table.

Change-Id: I22abdba00f8ccf587a3d7696e57970ed4653afc8
includes/User.php
maintenance/migrateUserGroup.php