mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19064: Fixing how User content items are updated
The part records where updated but no events were triggered because Publish was not called correctly. It needed a Get(DraftRequired) and ContentManager.Publish(user) Work Item: 19064 --HG-- branch : 1.x
This commit is contained in:
@@ -229,7 +229,7 @@ namespace Orchard.Users.Controllers {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage users")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var user = Services.ContentManager.Get<UserPart>(id);
|
||||
var user = Services.ContentManager.Get<UserPart>(id, VersionOptions.DraftRequired);
|
||||
string previousName = user.UserName;
|
||||
|
||||
dynamic model = Services.ContentManager.UpdateEditor(user, this);
|
||||
@@ -264,6 +264,8 @@ namespace Orchard.Users.Controllers {
|
||||
return View((object)model);
|
||||
}
|
||||
|
||||
Services.ContentManager.Publish(user.ContentItem);
|
||||
|
||||
Services.Notifier.Information(T("User information updated"));
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
Reference in New Issue
Block a user