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