- Fixing 16263: Cannot Add Admin user to the Administrators role

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-03-05 12:12:14 -08:00
parent 458cfc41dc
commit e64f0a3312

View File

@@ -111,8 +111,12 @@ namespace Orchard.Users.Controllers {
User = Services.ContentManager.UpdateEditorModel<User>(id, this)
};
// apply additional model properties that were posted on form
UpdateModel(model);
TryUpdateModel(model);
if (!ModelState.IsValid) {
Services.TransactionManager.Cancel();
return View(model);
}
model.User.Item.NormalizedUserName = model.UserName.ToLower();