mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
- Fixing build.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Security.Principal;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
|
@@ -2,7 +2,6 @@ using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Users.Drivers;
|
||||
@@ -71,11 +70,11 @@ namespace Orchard.Users.Controllers {
|
||||
|
||||
string userExistsMessage = _userService.VerifyUserUnicity(model.UserName, model.Email);
|
||||
if (userExistsMessage != null) {
|
||||
ModelState.AddModelError("NotUniqueUserName", T(userExistsMessage));
|
||||
AddModelError("NotUniqueUserName", T(userExistsMessage));
|
||||
}
|
||||
|
||||
if (model.Password != model.ConfirmPassword) {
|
||||
ModelState.AddModelError("ConfirmPassword", T("Password confirmation must match"));
|
||||
AddModelError("ConfirmPassword", T("Password confirmation must match"));
|
||||
}
|
||||
|
||||
user = _membershipService.CreateUser(new CreateUserParams(
|
||||
@@ -123,7 +122,7 @@ namespace Orchard.Users.Controllers {
|
||||
|
||||
string userExistsMessage = _userService.VerifyUserUnicity(id, model.UserName, model.Email);
|
||||
if (userExistsMessage != null) {
|
||||
ModelState.AddModelError("NotUniqueUserName", T(userExistsMessage));
|
||||
AddModelError("NotUniqueUserName", T(userExistsMessage));
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
@@ -148,6 +147,10 @@ namespace Orchard.Users.Controllers {
|
||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
||||
}
|
||||
|
||||
public void AddModelError(string key, LocalizedString errorMessage) {
|
||||
ModelState.AddModelError(key, errorMessage.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user