]> git.mxchange.org Git - friendica.git/blobdiff - mod/removeme.php
Merge pull request #4243 from MrPetovan/task/switch-to-array-new-style
[friendica.git] / mod / removeme.php
index 2f4349a7046fac6241bae33a768ee49a3442e627..5912a6e3139fda4d45bd695b9ca5d5a75e6d97a8 100644 (file)
@@ -26,9 +26,7 @@ function removeme_post(App $a)
                return;
        }
 
-       $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
-
-       if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
+       if (User::authenticate($a->user['uid'], trim($_POST['qxz_password']))) {
                User::remove($a->user['uid']);
                // NOTREACHED
        }
@@ -48,14 +46,14 @@ function removeme_content(App $a)
        $_SESSION['remove_account_verify'] = $hash;
 
        $tpl = get_markup_template('removeme.tpl');
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$basedir' => System::baseUrl(),
                '$hash' => $hash,
                '$title' => t('Remove My Account'),
                '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
                '$passwd' => t('Please enter your password for verification:'),
                '$submit' => t('Remove My Account')
-       ));
+       ]);
 
        return $o;
 }