diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-04-22 15:20:13 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-04-22 15:20:13 +0000 |
commit | 8b5fd806d6871aaeb179376328a8af215ed44f88 (patch) | |
tree | a31f8cc50864e11f850e610eaa2877e8f4419e45 /engine/lib/users.php | |
parent | d99f1028ce873ab99c345dcea5b4fba67d73203d (diff) | |
download | elgg-8b5fd806d6871aaeb179376328a8af215ed44f88.tar.gz elgg-8b5fd806d6871aaeb179376328a8af215ed44f88.tar.bz2 |
Closes #957: Annotations and metadata owned by a deleted user are now also deleted.
git-svn-id: https://code.elgg.org/elgg/trunk@3227 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r-- | engine/lib/users.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index e45223e54..5a9234dc6 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -143,6 +143,21 @@ // Now save specific stuff
return create_user_entity($this->get('guid'), $this->get('name'), $this->get('username'), $this->get('password'), $this->get('salt'), $this->get('email'), $this->get('language'), $this->get('code'));
+ } + + /** + * User specific override of the entity delete method. + * + * @return bool + */ + public function delete() + { + // Delete owned data + clear_annotations_by_owner($this->owner_guid); + clear_metadata_by_owner($this->owner_guid); + + // Delete entity + return parent::delete(); }
/**
|