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']);
30 function removeme_content(&$a) {
35 $hash = random_string();
37 require_once("mod/settings.php");
40 $_SESSION['remove_account_verify'] = $hash;
42 $tpl = get_markup_template('removeme.tpl');
43 $o .= replace_macros($tpl, array(
44 '$basedir' => $a->get_baseurl(),
46 '$title' => t('Remove My Account'),
47 '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
48 '$passwd' => t('Please enter your password for verification:'),
49 '$submit' => t('Remove My Account')