X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fprofilesettings.php;h=303bb0ad9bbd76be81fa193fb1adec3de72df680;hb=1543af748c7fe4be28348dfbfcdbde226c05ae29;hp=28b1d20f34125fab3b39b60281de0b08458dfeb2;hpb=d8d9edfc990a20f67421e40a7d3055a58697a002;p=quix0rs-gnu-social.git diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 28b1d20f34..303bb0ad9b 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -452,4 +452,42 @@ class ProfilesettingsAction extends AccountSettingsAction return $other->id != $user->id; } } + + function showAside() { + $user = common_current_user(); + + $this->elementStart('div', array('id' => 'aside_primary', + 'class' => 'aside')); + + $this->elementStart('div', array('id' => 'account_actions', + 'class' => 'section')); + $this->elementStart('ul'); + if (Event::handle('StartProfileSettingsActions', array($this))) { + if ($user->hasRight(Right::BACKUPACCOUNT)) { + $this->elementStart('li'); + $this->element('a', + array('href' => common_local_url('backupaccount')), + _('Backup account')); + $this->elementEnd('li'); + } + if ($user->hasRight(Right::DELETEACCOUNT)) { + $this->elementStart('li'); + $this->element('a', + array('href' => common_local_url('deleteaccount')), + _('Delete account')); + $this->elementEnd('li'); + } + if ($user->hasRight(Right::RESTOREACCOUNT)) { + $this->elementStart('li'); + $this->element('a', + 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'); + } }