summaryrefslogtreecommitdiff
path: root/app/views/user
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-22 14:22:26 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-22 14:22:26 +0200
commit3a929138b000a45f57b3a6c62d5cfa72b842538c (patch)
treeef477319f976201f6836b0c051feb28d15670231 /app/views/user
parent8754347a586ff595553bf00f8e70f96706760956 (diff)
Give possibility to delete its own account
See https://github.com/FreshRSS/FreshRSS/issues/679
Diffstat (limited to 'app/views/user')
-rw-r--r--app/views/user/profile.phtml22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml
index c44202edd..11097e546 100644
--- a/app/views/user/profile.phtml
+++ b/app/views/user/profile.phtml
@@ -57,4 +57,26 @@
</div>
</div>
</form>
+
+ <?php if (!FreshRSS_Auth::hasAccess('admin')) { ?>
+ <form method="post" action="<?php echo _url('user', 'delete'); ?>">
+ <legend><?php echo _t('conf.profile.delete'); ?></legend>
+
+ <p class="alert alert-warn"><span class="alert-head"><?php echo _t('gen.short.attention'); ?></span> <?php echo _t('conf.profile.delete.warn'); ?></p>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <?php
+ $redirect_url = urlencode(Minz_Url::display(
+ array('c' => 'index', 'a' => 'index'),
+ 'php', true
+ ));
+ ?>
+ <input type="hidden" name="r" value="<?php echo $redirect_url; ?>" />
+ <input type="hidden" name="username" value="<?php echo Minz_Session::param('currentUser', '_'); ?>" />
+ <button type="submit" class="btn btn-attention confirm"><?php echo _t('gen.action.remove'); ?></button>
+ </div>
+ </div>
+ </form>
+ <?php } ?>
</div>