コード例 #1
0
ファイル: ElggUser.php プロジェクト: sephiroth88/Elgg
 /**
  * User specific override of the entity delete method.
  *
  * @return bool
  */
 public function delete()
 {
     global $USERNAME_TO_GUID_MAP_CACHE;
     // clear cache
     if (isset($USERNAME_TO_GUID_MAP_CACHE[$this->username])) {
         unset($USERNAME_TO_GUID_MAP_CACHE[$this->username]);
     }
     clear_user_files($this);
     // Delete entity
     return parent::delete();
 }
コード例 #2
0
ファイル: users.php プロジェクト: adamboardman/Elgg
 /**
  * User specific override of the entity delete method.
  *
  * @return bool
  */
 public function delete()
 {
     global $USERNAME_TO_GUID_MAP_CACHE, $CODE_TO_GUID_MAP_CACHE;
     // clear cache
     if (isset($USERNAME_TO_GUID_MAP_CACHE[$this->username])) {
         unset($USERNAME_TO_GUID_MAP_CACHE[$this->username]);
     }
     if (isset($CODE_TO_GUID_MAP_CACHE[$this->code])) {
         unset($CODE_TO_GUID_MAP_CACHE[$this->code]);
     }
     // Delete owned data
     clear_annotations_by_owner($this->guid);
     clear_metadata_by_owner($this->guid);
     clear_user_files($this);
     // Delete entity
     return parent::delete();
 }