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

Commit dbb9f669 authored by Evan Prodromou's avatar Evan Prodromou

get email for code

parent a564af49
...@@ -253,14 +253,6 @@ class EmailregisterAction extends Action ...@@ -253,14 +253,6 @@ class EmailregisterAction extends Action
function setPassword() function setPassword()
{ {
if (!$this->tos) {
$this->error = _('You must accept the terms of service and privacy policy to register.');
$nickname = $this->nicknameFromEmail($this->email);
$this->form = new ConfirmRegistrationForm($this, $nickname, $this->email, $this->code);
$this->showPage();
return;
}
if (!empty($this->invitation)) { if (!empty($this->invitation)) {
$email = $this->invitation->address; $email = $this->invitation->address;
} else if (!empty($this->confirmation)) { } else if (!empty($this->confirmation)) {
...@@ -269,6 +261,14 @@ class EmailregisterAction extends Action ...@@ -269,6 +261,14 @@ class EmailregisterAction extends Action
throw new Exception('No confirmation thing.'); throw new Exception('No confirmation thing.');
} }
if (!$this->tos) {
$this->error = _('You must accept the terms of service and privacy policy to register.');
$nickname = $this->nicknameFromEmail($email);
$this->form = new ConfirmRegistrationForm($this, $nickname, $this->email, $this->code);
$this->showPage();
return;
}
$nickname = $this->nicknameFromEmail($email); $nickname = $this->nicknameFromEmail($email);
$this->user = User::registerNew(array('nickname' => $nickname, $this->user = User::registerNew(array('nickname' => $nickname,
...@@ -360,7 +360,7 @@ class EmailregisterAction extends Action ...@@ -360,7 +360,7 @@ class EmailregisterAction extends Action
$nickname = $parts[0]; $nickname = $parts[0];
$nickname = preg_replace('/[^A-Za-z0-9]/', '', $str); $nickname = preg_replace('/[^A-Za-z0-9]/', '', $nickname);
$nickname = Nickname::normalize($nickname); $nickname = Nickname::normalize($nickname);
......
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