add hooks for the account-management tools
This commit is contained in:
parent
4a9a5076ff
commit
48edbb3023
@ -1040,3 +1040,8 @@ EndImportActivity: when we finish importing an activity
|
|||||||
- $activity: The current activity
|
- $activity: The current activity
|
||||||
- $trusted: How "trusted" the process is
|
- $trusted: How "trusted" the process is
|
||||||
|
|
||||||
|
StartProfileSettingsActions: when we're showing account-management action list
|
||||||
|
- $action: Action being shown (use for output)
|
||||||
|
|
||||||
|
EndProfileSettingsActions: when we're showing account-management action list
|
||||||
|
- $action: Action being shown (use for output)
|
||||||
|
@ -458,27 +458,32 @@ class ProfilesettingsAction extends AccountSettingsAction
|
|||||||
|
|
||||||
$this->elementStart('div', array('id' => 'aside_primary',
|
$this->elementStart('div', array('id' => 'aside_primary',
|
||||||
'class' => 'aside'));
|
'class' => 'aside'));
|
||||||
if ($user->hasRight(Right::BACKUPACCOUNT)) {
|
$this->elementStart('ul');
|
||||||
$this->elementStart('li');
|
if (Event::handle('StartProfileSettingsActions', array($this))) {
|
||||||
$this->element('a',
|
if ($user->hasRight(Right::BACKUPACCOUNT)) {
|
||||||
array('href' => common_local_url('backupaccount')),
|
$this->elementStart('li');
|
||||||
_('Backup account'));
|
$this->element('a',
|
||||||
$this->elementEnd('li');
|
array('href' => common_local_url('backupaccount')),
|
||||||
}
|
_('Backup account'));
|
||||||
if ($user->hasRight(Right::DELETEACCOUNT)) {
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
}
|
||||||
$this->element('a',
|
if ($user->hasRight(Right::DELETEACCOUNT)) {
|
||||||
array('href' => common_local_url('deleteaccount')),
|
$this->elementStart('li');
|
||||||
_('Delete account'));
|
$this->element('a',
|
||||||
$this->elementEnd('li');
|
array('href' => common_local_url('deleteaccount')),
|
||||||
}
|
_('Delete account'));
|
||||||
if ($user->hasRight(Right::RESTOREACCOUNT)) {
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
}
|
||||||
$this->element('a',
|
if ($user->hasRight(Right::RESTOREACCOUNT)) {
|
||||||
array('href' => common_local_url('restoreaccount')),
|
$this->elementStart('li');
|
||||||
_('Restore account'));
|
$this->element('a',
|
||||||
$this->elementEnd('li');
|
array('href' => common_local_url('restoreaccount')),
|
||||||
|
_('Restore account'));
|
||||||
|
$this->elementEnd('li');
|
||||||
|
}
|
||||||
|
Event::handle('EndProfileSettingsActions', array($this));
|
||||||
}
|
}
|
||||||
|
$this->elementEnd('ul');
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user