<?php
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Model\User;
+
function removeme_post(App $a) {
if (! local_user()) {
$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
}
function removeme_content(App $a) {
if (! local_user()) {
- goaway(z_root());
+ goaway(System::baseUrl());
}
$hash = random_string();
$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.'),