Explorar o código

Blocked domain error message

Show Signup failed message and suggest contacting admin.
Achilleas Koutsou %!s(int64=5) %!d(string=hai) anos
pai
achega
b546d03daf
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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):
 		case models.IsErrNamePatternNotAllowed(err):
 			c.FormErr("UserName")
 			c.FormErr("UserName")
 			c.RenderWithErr(c.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), SIGNUP, &f)
 			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:
 		default:
 			c.ServerError("CreateUser", err)
 			c.ServerError("CreateUser", err)
 		}
 		}