}
}
+ $this->nickname = Nickname::normalize($this->trimmed('nickname'));
$this->password1 = $this->trimmed('password1');
$this->password2 = $this->trimmed('password2');
}
if (!empty($this->error)) {
- $nickname = $this->nicknameFromEmail($email);
- $this->form = new ConfirmRegistrationForm($this, $nickname, $email, $this->code);
+ $this->form = new ConfirmRegistrationForm($this, $this->nickname, $email, $this->code);
$this->showPage();
return;
}
- $nickname = $this->nicknameFromEmail($email);
-
try {
- $fields = array('nickname' => $nickname,
+ $fields = array('nickname' => $this->nickname,
'email' => $email,
'password' => $this->password1,
'email_confirmed' => true);
$this->user = User::register($fields);
} catch (ClientException $e) {
$this->error = $e->getMessage();
- $nickname = $this->nicknameFromEmail($email);
- $this->form = new ConfirmRegistrationForm($this, $nickname, $email, $this->code);
+ $this->form = new ConfirmRegistrationForm($this, $this->nickname, $email, $this->code);
$this->showPage();
return;
}
$this->elementStart('li');
// TRANS: Field label in e-mail registration form.
- $this->element('label', array('for' => 'nickname-ignore'), _m('LABEL','User name'));
+ $this->element('label', array('for' => 'nickname'), _m('LABEL','User name'));
- $this->element('input', array('name' => 'nickname-ignore',
+ $this->element('input', array('name' => 'nickname',
'type' => 'text',
- 'id' => 'nickname-ignore',
- 'disabled' => 'true',
+ 'id' => 'nickname',
'value' => $this->nickname));
$this->elementEnd('li');