mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-20 19:03:25 +08:00
#16849: Replacing strings and console.writelines by exception throwing.
--HG-- branch : dev
This commit is contained in:
@@ -333,9 +333,8 @@ namespace Orchard.Users.Controllers {
|
||||
if (!validate)
|
||||
return false;
|
||||
|
||||
string userUnicityMessage = _userService.VerifyUserUnicity(userName, email);
|
||||
if (userUnicityMessage != null) {
|
||||
ModelState.AddModelError("userExists", T(userUnicityMessage));
|
||||
if (!_userService.VerifyUserUnicity(userName, email)) {
|
||||
ModelState.AddModelError("userExists", T("User with that username and/or email already exists."));
|
||||
}
|
||||
if (password == null || password.Length < MinPasswordLength) {
|
||||
ModelState.AddModelError("password", T("You must specify a password of {0} or more characters.", MinPasswordLength));
|
||||
|
Reference in New Issue
Block a user