4 use Friendica\Core\System;
5 use Friendica\Model\User;
7 function removeme_post(App $a)
13 if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) {
17 if ((!x($_POST, 'qxz_password')) || (!strlen(trim($_POST['qxz_password'])))) {
21 if ((!x($_POST, 'verify')) || (!strlen(trim($_POST['verify'])))) {
25 if ($_POST['verify'] !== $_SESSION['remove_account_verify']) {
29 if (User::authenticate($a->user['uid'], trim($_POST['qxz_password']))) {
30 User::remove($a->user['uid']);
35 function removeme_content(App $a)
38 goaway(System::baseUrl());
41 $hash = random_string();
43 require_once("mod/settings.php");
46 $_SESSION['remove_account_verify'] = $hash;
48 $tpl = get_markup_template('removeme.tpl');
49 $o .= replace_macros($tpl, array(
50 '$basedir' => System::baseUrl(),
52 '$title' => t('Remove My Account'),
53 '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
54 '$passwd' => t('Please enter your password for verification:'),
55 '$submit' => t('Remove My Account')