X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FDelegation.php;h=c1cf15759f12e50ccf5cec9270436a6ac52cde87;hb=c18bda9397d0ea9d68ea7a81e6292459317fdbf5;hp=affe5e7b8fa8209f0745801bb5355ad66cdef3a1;hpb=3d97149007872d69ca43ec955137b887d95239cf;p=friendica.git diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index affe5e7b8f..c1cf15759f 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -37,7 +37,7 @@ use Friendica\Util\Proxy; */ class Delegation extends BaseModule { - public static function post(array $parameters = []) + protected function post(array $request = []) { if (!local_user()) { return; @@ -108,11 +108,12 @@ class Delegation extends BaseModule $ret = []; Hook::callAll('home_init', $ret); - DI::baseUrl()->redirect('profile/' . DI::app()->getLoggedInUserNickname()); - // NOTREACHED + notice($this->t('You are now logged in as %s', $user['username'])); + + DI::baseUrl()->redirect('network'); } - public static function content(array $parameters = []) + protected function content(array $request = []): string { if (!local_user()) { throw new ForbiddenException(DI::l10n()->t('Permission denied.')); @@ -133,7 +134,7 @@ class Delegation extends BaseModule $params = ['distinct' => true, 'expression' => 'convid']; $notifications += DBA::count('mail', ['uid' => $identity['uid'], 'seen' => false], $params); - $notifications += DBA::count('intro', ['blocked' => false, 'ignore' => false, 'uid' => $identity['uid']]); + $notifications += DI::intro()->countActiveForUser($identity['uid']); $identities[$key]['notifications'] = $notifications; }