diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-15 15:08:16 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-15 16:08:00 -0700 |
commit | 441e52718e4db4eb45bd5c76c5af446496f56f96 (patch) | |
tree | cc64045cb8368ecdf05ab8dcc87ef252965c3805 /lib/userprofile.php | |
parent | 9ec24f59ca61bbbb45667b548a872e724f31ab3e (diff) |
Background deletion of user accounts. Notices are deleted in chunks, then the user itself when they're all gone.
While deletion is in progress, the account is locked with the 'deleted' role, which disables all actions with rights control.
Todo:
* Pretty up the notice on the profile page about the pending delete. Show status?
* Possibly more thorough account disabling, such as disallowing all use for login and access.
* Improve error recovery; worst case is that an account gets left locked in 'deleted' state but the queue jobs have gotten dropped out. This would leave the username in use and any undeleted notices in place.
Diffstat (limited to 'lib/userprofile.php')
-rw-r--r-- | lib/userprofile.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/userprofile.php b/lib/userprofile.php index 8464c2446..2c3b1ea45 100644 --- a/lib/userprofile.php +++ b/lib/userprofile.php @@ -228,6 +228,17 @@ class UserProfile extends Widget function showEntityActions() { + if ($this->profile->hasRole(Profile_role::DELETED)) { + $this->out->elementStart('div', 'entity_actions'); + $this->out->element('h2', null, _('User actions')); + $this->out->elementStart('ul'); + $this->out->elementStart('p', array('class' => 'profile_deleted')); + $this->out->text(_('User deletion in progress...')); + $this->out->elementEnd('p'); + $this->out->elementEnd('ul'); + $this->out->elementEnd('div'); + return; + } if (Event::handle('StartProfilePageActionsSection', array(&$this->out, $this->profile))) { $cur = common_current_user(); |