/** @inheritdoc */ public function init() { $this->finder = \Yii::$container->get(Finder::className()); $this->mailer = \Yii::$container->get(Mailer::className()); $this->module = \Yii::$app->getModule('user'); parent::init(); }
public function init() { parent::init(); $this->on(self::AFTER_REGISTER, [$this, 'assignDefaultRole']); $this->on(self::AFTER_CREATE, [$this, 'assignDefaultRole']); if ($this->module->enableUnconfirmedLogin) { $this->on(self::AFTER_REGISTER, [$this, 'loginAfterRegister']); } }
public function init() { parent::init(); $this->mailer = Yii::$container->get(CustomMailer::className()); }