From 6dfe73288268a148fc24668ff107c1de7f1b85c0 Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Sun, 29 Apr 2018 15:18:56 +0800 Subject: [PATCH] Update# registercontroller so that request param is passed to method, easier for testing --- controller/registercontroller.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controller/registercontroller.php b/controller/registercontroller.php index 16c726e..9c914f2 100644 --- a/controller/registercontroller.php +++ b/controller/registercontroller.php @@ -69,11 +69,10 @@ class RegisterController extends Controller { /** * @PublicPage * + * @param string $email * @return TemplateResponse */ - public function validateEmail() { - $email = $this->request->getParam('email'); - + public function validateEmail($email) { if (!$this->registrationService->checkAllowedDomains($email)) { return new TemplateResponse('registration', 'domains', [ 'domains' => $this->registrationService->getAllowedDomains()