mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Check if user's email address is already used
This commit is contained in:
parent
4f601550a2
commit
bab48abcfd
1 changed files with 7 additions and 0 deletions
|
@ -54,6 +54,13 @@ public class RegisterForm : BaseLayout
|
|||
return this.Page();
|
||||
}
|
||||
|
||||
if (ServerSettings.Instance.SMTPEnabled &&
|
||||
await this.Database.Users.FirstOrDefaultAsync(u => u.EmailAddress.ToLower() == emailAddress.ToLower()) != null)
|
||||
{
|
||||
this.Error = "The email address you've chosen is already taken.";
|
||||
return this.Page();
|
||||
}
|
||||
|
||||
if (!await Request.CheckCaptchaValidity())
|
||||
{
|
||||
this.Error = "You must complete the captcha correctly.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue