/** * Permanently remove all profile's associated data */ public function removeAllProfilesData($profile_id) { // check if exists $profile = $this->getProfileByField('id', $profile_id); if (!$profile) { return false; } $Images = new Application_Model_Images(); $Images->removeUsersImages($profile_id); $Albums = new Application_Model_Albums(); $Albums->deleteAlbums($profile_id); $Comments = new Application_Model_Comments(); $Comments->deleteComments($profile_id); $Connections = new Application_Model_Connections(); $Connections->removeUsersConnections($profile_id); $Likes = new Application_Model_Likes(); $Likes->removeUsersLikes($profile_id); $Notifications = new Application_Model_Notifications(); $Notifications->removeUsersNotifications($profile_id); $Reports = new Application_Model_Reports(); $Reports->removeUsersReports($profile_id); $Posts = new Application_Model_Posts(); $Posts->removeUsersPosts($profile_id); $Messages = new Application_Model_Messages(); $Messages->removeUsersMessages($profile_id); $ProfilesMeta = new Application_Model_ProfilesMeta(); $ProfilesMeta->removeMetaForProfile($profile_id); return true; }