X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fremoveme.php;h=b1ad2e5ca0d2bf8583d403a11e3dff71651b2e7a;hb=09667dd82bbb9bb23a4ad8d86c1e9f3146665aa5;hp=ee88bd76a55212d89521eea7b12e782266b76b2e;hpb=068cb53a9ea44cf276c6b0e39ef92182b883d5fa;p=friendica.git diff --git a/mod/removeme.php b/mod/removeme.php old mode 100755 new mode 100644 index ee88bd76a5..b1ad2e5ca0 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -1,46 +1,56 @@ user['password'])) && ($encrypted === $a->user['password'])) { - require_once('include/Contact.php'); - user_remove($a->user['uid']); + if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) { + User::remove($a->user['uid']); // NOTREACHED } } +function removeme_content(App $a) { - -function removeme_content(&$a) { - - if(! local_user()) - goaway(z_root()); + if (! local_user()) { + goaway(System::baseUrl()); + } $hash = random_string(); + require_once("mod/settings.php"); + settings_init($a); + $_SESSION['remove_account_verify'] = $hash; $tpl = get_markup_template('removeme.tpl'); $o .= replace_macros($tpl, array( - '$basedir' => $a->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.'), @@ -48,6 +58,6 @@ function removeme_content(&$a) { '$submit' => t('Remove My Account') )); - return $o; + return $o; -} \ No newline at end of file +}