diff --git a/appinfo/routes.php b/appinfo/routes.php index ac7acb9..d3334cf 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -22,6 +22,5 @@ namespace OCA\Registration\AppInfo; $application = new Application(); $application->registerRoutes($this, array('routes' => array( - array('name' => 'page#index', 'url' => '/', 'verb' => 'GET'), - array('name' => 'page#do_echo', 'url' => '/echo', 'verb' => 'POST'), + array('name' => 'registration#displayRegisterPage', 'url' => '/', 'verb' => 'GET') ))); diff --git a/controller/registrationcontroller.php b/controller/registrationcontroller.php index 1b8bf7b..5d07ed1 100644 --- a/controller/registrationcontroller.php +++ b/controller/registrationcontroller.php @@ -26,24 +26,11 @@ class RegistrationController extends Controller { * @NoAdminRequired * @PublicPage */ - public function displayRegisterPage($errormsg, $entered) { - OC_Template::printGuestPage('core/registration', 'register', - array('errormsg' => $errormsg, - 'entered' => $entered)); + public function displayRegisterPage() { + $params = array( + 'errormsg' => $this->request->getParam('errormsg'), + 'entered' => $this->request->getParam('entered') + ); + return new TemplateResponse('registration', 'register', $params); } - public function index() { - $params = array('user' => $this->userId); - return new TemplateResponse('registration', 'main', $params); // templates/main.php - } - - - /** - * Simply method that posts back the payload of the request - * @NoAdminRequired - */ - public function doEcho($echo) { - return array('echo' => $echo); - } - - }