X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fremoveme.php;h=5dcd33e8f57d2f63b8ae01a7648deb1f21bd3e5e;hb=a0530d1066d7268f1b1ea67bc3c254e9f9fc5ec8;hp=6a56963b6c8a8426ca75613b89ab46f976682250;hpb=b2e92e0af32f86212d15748c6d432d658905d4b6;p=friendica.git diff --git a/mod/removeme.php b/mod/removeme.php index 6a56963b6c..5dcd33e8f5 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -1,22 +1,33 @@ user['password'])) && ($encrypted === $a->user['password'])) { + if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) { require_once('include/Contact.php'); user_remove($a->user['uid']); // NOTREACHED @@ -24,20 +35,22 @@ function removeme_post(&$a) { } +function removeme_content(App $a) { - -function removeme_content(&$a) { - - if(! local_user()) - goaway($a->get_baseurl()); + 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.'), @@ -45,6 +58,6 @@ function removeme_content(&$a) { '$submit' => t('Remove My Account') )); - return $o; + return $o; -} \ No newline at end of file +}