Halting user registration throw errors
I'm trying to use custom Registration which extends BaseRegister. But using this->halt in beforeRegister hook to stop the creation process if condition doesn't meet is throwing error page to the user which is not intended. It should stop the process gracefully just like it does in resources. Any help on this?
protected function beforeRegister(): void
{
if (!$this->getFreePlan()) {
Notification::make()
->danger()
->title('Registration Error')
->body('No free plan is available at the moment. Please contact support.')
->persistent()
->send();
$this->exit();
}
}
1 Reply
??
??