RegisterController route

This commit is contained in:
Pellaeon Lin 2014-08-28 15:43:48 +00:00
parent 43c19afed4
commit a88197f646
2 changed files with 7 additions and 21 deletions

View File

@ -22,6 +22,5 @@ namespace OCA\Registration\AppInfo;
$application = new Application(); $application = new Application();
$application->registerRoutes($this, array('routes' => array( $application->registerRoutes($this, array('routes' => array(
array('name' => 'page#index', 'url' => '/', 'verb' => 'GET'), array('name' => 'registration#displayRegisterPage', 'url' => '/', 'verb' => 'GET')
array('name' => 'page#do_echo', 'url' => '/echo', 'verb' => 'POST'),
))); )));

View File

@ -26,24 +26,11 @@ class RegistrationController extends Controller {
* @NoAdminRequired * @NoAdminRequired
* @PublicPage * @PublicPage
*/ */
public function displayRegisterPage($errormsg, $entered) { public function displayRegisterPage() {
OC_Template::printGuestPage('core/registration', 'register', $params = array(
array('errormsg' => $errormsg, 'errormsg' => $this->request->getParam('errormsg'),
'entered' => $entered)); '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);
}
} }