3 if(! function_exists('removeme_post')) {
4 function removeme_post(&$a) {
9 if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
12 if((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password']))))
15 if((! x($_POST,'verify')) || (! strlen(trim($_POST['verify']))))
18 if($_POST['verify'] !== $_SESSION['remove_account_verify'])
21 $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
23 if((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
24 require_once('include/Contact.php');
25 user_remove($a->user['uid']);
31 if(! function_exists('removeme_content')) {
32 function removeme_content(&$a) {
37 $hash = random_string();
39 require_once("mod/settings.php");
42 $_SESSION['remove_account_verify'] = $hash;
44 $tpl = get_markup_template('removeme.tpl');
45 $o .= replace_macros($tpl, array(
46 '$basedir' => $a->get_baseurl(),
48 '$title' => t('Remove My Account'),
49 '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
50 '$passwd' => t('Please enter your password for verification:'),
51 '$submit' => t('Remove My Account')