We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 90a66b61 authored by Evan Prodromou's avatar Evan Prodromou

correct password form fields

parent fc89006e
......@@ -275,6 +275,16 @@ class EmailregisterAction extends Action
if (!$this->tos) {
$this->error = _('You must accept the terms of service and privacy policy to register.');
return;
} else if (empty($this->password1)) {
$this->error = _('You must set a password');
} else if (strlen($this->password1) < 6) {
$this->error = _('Password must be 6 or more characters.');
} else if ($this->password1 != $this->password2) {
$this->error = _('Passwords do not match.');
}
if (!empty($this->error)) {
$nickname = $this->nicknameFromEmail($email);
$this->form = new ConfirmRegistrationForm($this, $nickname, $this->email, $this->code);
$this->showPage();
......@@ -285,6 +295,7 @@ class EmailregisterAction extends Action
$this->user = User::register(array('nickname' => $nickname,
'email' => $email,
'password' => $this->password1,
'email_confirmed' => true));
if (empty($this->user)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment