app/forms/Registration.php: enable user to change email.
This commit is contained in:
parent
19fdee782c
commit
dde8818296
1 changed files with 1 additions and 5 deletions
|
|
@ -83,14 +83,10 @@ class Registration extends FormBase
|
|||
// Email
|
||||
$email = new Text('email', array(
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'Email',
|
||||
'readonly' => '',
|
||||
'placeholder' => 'Email'
|
||||
));
|
||||
|
||||
$email->addValidators([
|
||||
new IdenticalValidator([
|
||||
'accepted' => $user->getEmail(),
|
||||
]),
|
||||
new CallbackValidator([
|
||||
'callback' => function($data) { return User::findFirstByEmail($data['email']) === false; },
|
||||
'message' => 'This email already exist.',
|
||||
|
|
|
|||
Reference in a new issue