3 function removeme_post(&$a) {
8 if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
11 if((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password']))))
14 if((! x($_POST,'verify')) || (! strlen(trim($_POST['verify']))))
17 if($_POST['verify'] !== $_SESSION['remove_account_verify'])
20 $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
22 if((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
23 require_once('include/Contact.php');
24 user_remove($a->user['uid']);
32 function removeme_content(&$a) {
37 $hash = random_string();
39 $_SESSION['remove_account_verify'] = $hash;
41 $tpl = get_markup_template('removeme.tpl');
42 $o .= replace_macros($tpl, array(
43 '$basedir' => $a->get_baseurl(),
45 '$title' => t('Remove My Account'),
46 '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
47 '$passwd' => t('Please enter your password for verification:'),
48 '$submit' => t('Remove My Account')