mirror of
https://github.com/friendica/friendica
synced 2025-04-28 23:44:23 +02:00
Implement home_init hook as Event
This commit is contained in:
parent
aabf9a8b01
commit
742cde89e6
5 changed files with 19 additions and 8 deletions
|
@ -11,6 +11,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Event\Event;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
|
@ -34,11 +35,11 @@ class Home extends BaseModule
|
|||
{
|
||||
$basePath = DI::appHelper()->getBasePath();
|
||||
$config = DI::config();
|
||||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
// currently no returned data is used
|
||||
$ret = [];
|
||||
|
||||
Hook::callAll('home_init', $ret);
|
||||
$eventDispatcher->dispatch(
|
||||
new Event(Event::HOME_INIT)
|
||||
);
|
||||
|
||||
if (DI::userSession()->getLocalUserId() && (DI::userSession()->getLocalUserNickname())) {
|
||||
DI::baseUrl()->redirect('network');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue