Nothing said that the EmailRegistration plugin was meant to restrict
the nickname to the local part of the email address. Let users change
it before they actually register the user.
+ $this->nickname = Nickname::normalize($this->trimmed('nickname'));
$this->password1 = $this->trimmed('password1');
$this->password2 = $this->trimmed('password2');
$this->password1 = $this->trimmed('password1');
$this->password2 = $this->trimmed('password2');
}
if (!empty($this->error)) {
}
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;
}
$this->showPage();
return;
}
- $nickname = $this->nicknameFromEmail($email);
-
- $fields = array('nickname' => $nickname,
+ $fields = array('nickname' => $this->nickname,
'email' => $email,
'password' => $this->password1,
'email_confirmed' => true);
'email' => $email,
'password' => $this->password1,
'email_confirmed' => true);
$this->user = User::register($fields);
} catch (ClientException $e) {
$this->error = $e->getMessage();
$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->showPage();
return;
}
$this->elementStart('li');
// TRANS: Field label in e-mail registration form.
$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',
- 'id' => 'nickname-ignore',
- 'disabled' => 'true',
'value' => $this->nickname));
$this->elementEnd('li');
'value' => $this->nickname));
$this->elementEnd('li');