5 function removeme_post(App $a) {
11 if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
15 if ((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password'])))) {
19 if ((! x($_POST,'verify')) || (! strlen(trim($_POST['verify'])))) {
23 if ($_POST['verify'] !== $_SESSION['remove_account_verify']) {
27 $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
29 if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
30 require_once('include/Contact.php');
31 user_remove($a->user['uid']);
37 function removeme_content(App $a) {
43 $hash = random_string();
45 require_once("mod/settings.php");
48 $_SESSION['remove_account_verify'] = $hash;
50 $tpl = get_markup_template('removeme.tpl');
51 $o .= replace_macros($tpl, array(
52 '$basedir' => App::get_baseurl(),
54 '$title' => t('Remove My Account'),
55 '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
56 '$passwd' => t('Please enter your password for verification:'),
57 '$submit' => t('Remove My Account')