RegisterController route
This commit is contained in:
parent
43c19afed4
commit
a88197f646
|
|
@ -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')
|
||||
)));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue