registry = $registry; $this->l10nFactory = $l10nFactory; $this->notificationManager = $notificationManager; } /** * @inheritDoc */ public function createUserIsLegit(): void { if ($this->registry->delegateIsHardUserLimitReached($this->notificationManager)) { $l = $this->l10nFactory->get('lib'); throw new HintException($l->t('The user was not created because the user limit has been reached. Check your notifications to learn more.')); } } }