/**
  * @param $uid int
  * @param $oldName string
  * @param $newName string
  * @return bool
  */
 static function onRenameUserPreRename($uid, $oldName, $newName)
 {
     $oldCentral = new CentralAuthUser($oldName);
     // If we're doing a global rename, the account will not get unattached
     // because the old account no longer exists
     if ($oldCentral->exists() && $oldCentral->isAttached()) {
         $oldCentral->adminUnattach(array(wfWikiID()));
     }
     return true;
 }
Esempio n. 2
0
 /**
  * @param $uid
  * @param $oldName
  * @param $newName
  * @return bool
  */
 static function onRenameUserPreRename($uid, $oldName, $newName)
 {
     $oldCentral = new CentralAuthUser($oldName);
     if ($oldCentral->exists() && $oldCentral->isAttached()) {
         $oldCentral->adminUnattach(array(wfWikiID()));
     }
     return true;
 }