Start working on createAccount controller
This commit is contained in:
parent
2a8ff61496
commit
77a8e73324
|
|
@ -111,7 +111,28 @@ class RegisterController extends Controller {
|
|||
))
|
||||
), 'error');
|
||||
} elseif ( $email ) {
|
||||
return new TemplateResponse('registration', 'form', array(), 'guest');
|
||||
return new TemplateResponse('registration', 'form', array('email' => $email), 'guest');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @PublicPage
|
||||
*/
|
||||
public function createAccount($token) {
|
||||
$email = $this->pendingreg->findEmailByToken($token);
|
||||
if ( \OCP\DB::isError($email) ) {
|
||||
return new TemplateResponse('', 'error', array(
|
||||
'errors' => array(array(
|
||||
'error' => $this->l10n->t('Invalid verification URL. No registration request with this verification URL is found.'),
|
||||
'hint' => ''
|
||||
))
|
||||
), 'error');
|
||||
} elseif ( $email ) {
|
||||
$username = $this->request->getParam('username');
|
||||
$password = $this->request->getParam('password');
|
||||
return new TemplateResponse('registration', 'form', array('email' => $email), 'guest');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<form action="" method="post">
|
||||
<form action="<?php print_unescaped(OC_Helper::linkToRoute('registration.register.createAccount')) ?>" method="post">
|
||||
<fieldset>
|
||||
<?php if ( $_['errormsgs'] ) {?>
|
||||
<ul class="error">
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
</p>
|
||||
|
||||
<p class="infield groupmiddle">
|
||||
<input type="text" name="user" id="user" value="<?php echo $_['entered_data']['user']; ?>" />
|
||||
<label for="user" class="infield"><?php print_unescaped($l->t( 'Username' )); ?></label>
|
||||
<input type="text" name="username" id="username" value="<?php echo $_['entered_data']['user']; ?>" />
|
||||
<label for="username" class="infield"><?php print_unescaped($l->t( 'Username' )); ?></label>
|
||||
<img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue