/** * Deny a user's registration * * @param string $token * @return mixed */ public function denyRegistration($token, AppMailer $mailer) { $user = $this->users->denyUser($token); if (!empty($user)) { $person = new Person(); $person->setNode($user); // Send an email to the user that his email has been confirmed $mailer->sendRegistrationDenial($person); } return redirect('/persons'); }