4 use Friendica\Core\System;
6 function removeme_post(App $a) {
12 if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
16 if ((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password'])))) {
20 if ((! x($_POST,'verify')) || (! strlen(trim($_POST['verify'])))) {
24 if ($_POST['verify'] !== $_SESSION['remove_account_verify']) {
28 $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
30 if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
31 require_once('include/Contact.php');
32 user_remove($a->user['uid']);
38 function removeme_content(App $a) {
41 goaway(System::baseUrl());
44 $hash = random_string();
46 require_once("mod/settings.php");
49 $_SESSION['remove_account_verify'] = $hash;
51 $tpl = get_markup_template('removeme.tpl');
52 $o .= replace_macros($tpl, array(
53 '$basedir' => System::baseUrl(),
55 '$title' => t('Remove My Account'),
56 '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
57 '$passwd' => t('Please enter your password for verification:'),
58 '$submit' => t('Remove My Account')