]> git.mxchange.org Git - friendica.git/blobdiff - mod/removeme.php
Merge pull request #3965 from tobiasd/20171126-docGettingStarted
[friendica.git] / mod / removeme.php
index 40033624d8889ac330a8be2c7f725febef8e2cfc..b1ad2e5ca0d2bf8583d403a11e3dff71651b2e7a 100644 (file)
@@ -1,5 +1,9 @@
 <?php
 
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Model\User;
+
 function removeme_post(App $a) {
 
        if (! local_user()) {
@@ -25,8 +29,7 @@ function removeme_post(App $a) {
        $encrypted = hash('whirlpool',trim($_POST['qxz_password']));
 
        if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) {
-               require_once('include/Contact.php');
-               user_remove($a->user['uid']);
+               User::remove($a->user['uid']);
                // NOTREACHED
        }
 
@@ -35,7 +38,7 @@ function removeme_post(App $a) {
 function removeme_content(App $a) {
 
        if (! local_user()) {
-               goaway(z_root());
+               goaway(System::baseUrl());
        }
 
        $hash = random_string();
@@ -47,7 +50,7 @@ function removeme_content(App $a) {
 
        $tpl = get_markup_template('removeme.tpl');
        $o .= replace_macros($tpl, array(
-               '$basedir' => App::get_baseurl(),
+               '$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.'),