mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
- LiveWriter: Save the author field for blog posts...
- fix bug in user creation... --HG-- branch : dev
This commit is contained in:
@@ -63,14 +63,6 @@ namespace Orchard.Users.Controllers {
|
||||
var model = new UserCreateViewModel();
|
||||
UpdateModel(model);
|
||||
|
||||
var user = _membershipService.CreateUser(new CreateUserParams(
|
||||
model.UserName,
|
||||
model.Password,
|
||||
model.Email,
|
||||
null, null, true));
|
||||
|
||||
model.User = Services.ContentManager.UpdateEditorModel(user, this);
|
||||
|
||||
string userExistsMessage = VerifyUserUnicity(model.UserName, model.Email);
|
||||
if (userExistsMessage != null) {
|
||||
AddModelError("NotUniqueUserName", T(userExistsMessage));
|
||||
@@ -80,6 +72,14 @@ namespace Orchard.Users.Controllers {
|
||||
AddModelError("ConfirmPassword", T("Password confirmation must match"));
|
||||
}
|
||||
|
||||
var user = _membershipService.CreateUser(new CreateUserParams(
|
||||
model.UserName,
|
||||
model.Password,
|
||||
model.Email,
|
||||
null, null, true));
|
||||
|
||||
model.User = Services.ContentManager.UpdateEditorModel(user, this);
|
||||
|
||||
if (ModelState.IsValid == false) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
|
Reference in New Issue
Block a user