Browse Source

Blocked domain error message

Show Signup failed message and suggest contacting admin.
Achilleas Koutsou 5 years ago
parent
commit
b546d03daf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      routes/user/auth.go

+ 2 - 0
routes/user/auth.go

@@ -352,6 +352,8 @@ func SignUpPost(c *context.Context, cpt *captcha.Captcha, f form.Register) {
 		case models.IsErrNamePatternNotAllowed(err):
 			c.FormErr("UserName")
 			c.RenderWithErr(c.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), SIGNUP, &f)
+		case models.IsErrBlockedDomain(err):
+			c.RenderWithErr("Signup failed. Please contact the site administrators.", SIGNUP, &f)
 		default:
 			c.ServerError("CreateUser", err)
 		}