X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fregmod.php;h=295d8df25f5a02066c41d74376f8bdd0941f7bb4;hb=39a537c415fad16c51e1422ff32ab60ac76da6b8;hp=3f6f0e04e3253e6073f686548e16450b3374d225;hpb=9e1065ff87e22dcf38f97f203030bc7a73ae64ba;p=friendica.git diff --git a/mod/regmod.php b/mod/regmod.php index 3f6f0e04e3..295d8df25f 100644 --- a/mod/regmod.php +++ b/mod/regmod.php @@ -13,11 +13,9 @@ use Friendica\Model\Register; use Friendica\Model\User; use Friendica\Module\Login; -require_once 'include/enotify.php'; - function user_allow($hash) { - $a = get_app(); + $a = \get_app(); $register = Register::getByHash($hash); if (!DBA::isResult($register)) { @@ -46,7 +44,7 @@ function user_allow($hash) $user, Config::get('config', 'sitename'), $a->getBaseUrl(), - defaults($register, 'password', 'Sent in a previous email') + ($register['password'] ?? '') ?: 'Sent in a previous email' ); L10n::popLang(); @@ -84,7 +82,7 @@ function regmod_content(App $a) { if (!local_user()) { info(L10n::t('Please login.') . EOL); - return Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? 0 : 1); + return Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === \Friendica\Module\Register::CLOSED ? 0 : 1); } if (!is_site_admin() || !empty($_SESSION['submanage'])) { @@ -101,11 +99,11 @@ function regmod_content(App $a) if ($cmd === 'deny') { user_deny($hash); - goaway('admin/users/'); + $a->internalRedirect('admin/users/'); } if ($cmd === 'allow') { user_allow($hash); - goaway('admin/users/'); + $a->internalRedirect('admin/users/'); } }