fix missing unique mail validation on user register

This commit is contained in:
msquare 2018-11-18 12:13:00 +01:00
parent 8db159580d
commit 8236989be0
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,10 @@ function guest_register()
$valid = false; $valid = false;
$msg .= error(__('E-mail address is not correct.'), true); $msg .= error(__('E-mail address is not correct.'), true);
} }
if (User::whereEmail($mail)->first()) {
$valid = false;
$msg .= error(__('E-mail address is already used by another user.'), true);
}
} else { } else {
$valid = false; $valid = false;
$msg .= error(__('Please enter your e-mail.'), true); $msg .= error(__('Please enter your e-mail.'), true);