%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/auto-follow/
Upload File :
Create Path :
Current File : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/auto-follow/Events.php

<?php

namespace humhub\modules\autofollow;

use humhub\modules\space\models\Space;
use Yii;

/**
 * Event Callbacks
 *
 * @author luke
 */
class Events
{

    public static function onAfterUserCreate($event)
    {
        $user = $event->sender;
        $module = Yii::$app->getModule('auto-follow');

        foreach ($module->getAutoFollows() as $container) {

            if ($container instanceof Space && $container->isMember($user->id)) {
                continue;
            }

            $container->follow($user);

        }
    }

}

Zerion Mini Shell 1.0