]> git.mxchange.org Git - friendica.git/blobdiff - mod/removeme.php
Merge pull request #6170 from annando/safe-save
[friendica.git] / mod / removeme.php
index b386ec12f5ccabd09280900a32fc0a3b1139c7d1..49b8f6d5345d4478ecb83582c02f3b989ea9cec2 100644 (file)
@@ -6,9 +6,11 @@
 use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
+use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Model\User;
+use Friendica\Util\Strings;
 
 require_once 'include/enotify.php';
 
@@ -64,19 +66,19 @@ function removeme_post(App $a)
 function removeme_content(App $a)
 {
        if (!local_user()) {
-               goaway(System::baseUrl());
+               $a->internalRedirect();
        }
 
-       $hash = random_string();
+       $hash = Strings::getRandomHex();
 
        require_once("mod/settings.php");
        settings_init($a);
 
        $_SESSION['remove_account_verify'] = $hash;
 
-       $tpl = get_markup_template('removeme.tpl');
-       $o = replace_macros($tpl, [
-               '$basedir' => System::baseUrl(),
+       $tpl = Renderer::getMarkupTemplate('removeme.tpl');
+       $o = Renderer::replaceMacros($tpl, [
+               '$basedir' => $a->getBaseURL(),
                '$hash' => $hash,
                '$title' => L10n::t('Remove My Account'),
                '$desc' => L10n::t('This will completely remove your account. Once this has been done it is not recoverable.'),