mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-24 05:42:10 +08:00
Define constants for maximum username/email length
This commit is contained in:
@@ -362,7 +362,7 @@ namespace Orchard.Users.Controllers {
|
||||
validate = false;
|
||||
}
|
||||
else {
|
||||
if (userName.Length >= 255) {
|
||||
if (userName.Length >= UserPart.MaxUserNameLength) {
|
||||
ModelState.AddModelError("username", T("The username you provided is too long."));
|
||||
validate = false;
|
||||
}
|
||||
@@ -372,7 +372,7 @@ namespace Orchard.Users.Controllers {
|
||||
ModelState.AddModelError("email", T("You must specify an email address."));
|
||||
validate = false;
|
||||
}
|
||||
else if (email.Length >= 255) {
|
||||
else if (email.Length >= UserPart.MaxEmailLength) {
|
||||
ModelState.AddModelError("email", T("The email address you provided is too long."));
|
||||
validate = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user