X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fremoveme.php;h=9ef372fede6d95fe3106826e8b9c6f9fc98945d5;hb=d9075add1a32df8f603b423ae29b28792c82f92f;hp=ee0a4c275b6f1f56745649596152593d051003d6;hpb=13a10b8f20ac7c5927c39d9e80e1a7d515385736;p=friendica.git diff --git a/mod/removeme.php b/mod/removeme.php index ee0a4c275b..9ef372fede 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -1,6 +1,6 @@ getLocalUserId()) { return; } - if (!empty($_SESSION['submanage'])) { + if (DI::userSession()->getSubManagedUserId()) { return; } @@ -57,20 +57,22 @@ function removeme_post(App $a) continue; } + $l10n = DI::l10n()->withLang($admin['language']); + $email = DI::emailer() ->newSystemMail() ->withMessage( - DI::l10n()->t('[Friendica System Notify]') . ' ' . DI::l10n()->t('User deleted their account'), - DI::l10n()->t('On your Friendica node an user deleted their account. Please ensure that their data is removed from the backups.'), - DI::l10n()->t('The user id is %d', local_user())) + $l10n->t('[Friendica System Notify]') . ' ' . $l10n->t('User deleted their account'), + $l10n->t('On your Friendica node an user deleted their account. Please ensure that their data is removed from the backups.'), + $l10n->t('The user id is %d', DI::userSession()->getLocalUserId())) ->forUser($admin) ->withRecipient($admin['email']) ->build(); DI::emailer()->send($email); } - if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) { - User::remove($a->user['uid']); + if (User::getIdFromPasswordAuthentication($a->getLoggedInUserId(), trim($_POST['qxz_password']))) { + User::remove($a->getLoggedInUserId()); unset($_SESSION['authenticated']); unset($_SESSION['uid']); @@ -81,7 +83,7 @@ function removeme_post(App $a) function removeme_content(App $a) { - if (!local_user()) { + if (!DI::userSession()->getLocalUserId()) { DI::baseUrl()->redirect(); }