/** * Instantly redirect back in case the user is already a member of all groups */ public function onRequest() { if ($this->createDataSource()->select()->from('group')->count() === 0) { Notification::info(sprintf($this->translate('User %s is already a member of all groups'), $this->userName)); $this->getResponse()->redirectAndExit($this->getRedirectUrl()); } }