summaryrefslogtreecommitdiff
path: root/actions/deleteuser.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-17 12:15:40 -0700
committerBrion Vibber <brion@pobox.com>2010-03-17 12:15:40 -0700
commit67f2f01c5e1cad743e849cdaaaf11deb6e435844 (patch)
treecad1ddbfef5a9b28bc8c13cf7f4ba6240bf6f7d0 /actions/deleteuser.php
parent1c942afa60b7ec5a8f0855a14d32110837270119 (diff)
parentca5612c451e4dabde107ff2cfbc737a2f69136df (diff)
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'actions/deleteuser.php')
-rw-r--r--actions/deleteuser.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/actions/deleteuser.php b/actions/deleteuser.php
index c4f84fad2..4e6b27395 100644
--- a/actions/deleteuser.php
+++ b/actions/deleteuser.php
@@ -162,7 +162,15 @@ class DeleteuserAction extends ProfileFormAction
function handlePost()
{
if (Event::handle('StartDeleteUser', array($this, $this->user))) {
- $this->user->delete();
+ // Mark the account as deleted and shove low-level deletion tasks
+ // to background queues. Removing a lot of posts can take a while...
+ if (!$this->user->hasRole(Profile_role::DELETED)) {
+ $this->user->grantRole(Profile_role::DELETED);
+ }
+
+ $qm = QueueManager::get();
+ $qm->enqueue($this->user, 'deluser');
+
Event::handle('EndDeleteUser', array($this, $this->user));
}
}