Fixed: Child account packages not suspending resulting in child services not
being suspended with the parent. Fixed: Child account peer users were not being suspended when the parent is suspended.
This commit is contained in:
parent
56ec2b3b20
commit
aef44beb22
1 changed files with 22 additions and 12 deletions
|
@ -678,6 +678,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.StartTask(taskId, "USER", "CHANGE_STATUS", user.Username);
|
||||
TaskManager.ItemId = user.UserId;
|
||||
|
||||
// update user packages
|
||||
List<PackageInfo> packages = new List<PackageInfo>();
|
||||
|
||||
// Add the users package(s)
|
||||
packages.AddRange(PackageController.GetPackages(userId));
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
@ -699,19 +705,23 @@ namespace WebsitePanel.EnterpriseServer
|
|||
List<UserInfo> children = GetUsers(userId, true);
|
||||
foreach (UserInfo child in children)
|
||||
{
|
||||
result = ChangeUserStatusInternal(child.UserId, status);
|
||||
// Add the child users packages
|
||||
packages.AddRange(PackageController.GetPackages(child.UserId));
|
||||
|
||||
// change child user peers
|
||||
List<UserInfo> childPeers = GetUserPeers(child.UserId);
|
||||
foreach (UserInfo peer in childPeers)
|
||||
{
|
||||
result = ChangeUserStatusInternal(peer.UserId, status);
|
||||
if (result < 0)
|
||||
return result;
|
||||
}
|
||||
|
||||
// update user packages
|
||||
List<PackageInfo> packages = new List<PackageInfo>();
|
||||
|
||||
// his packages
|
||||
packages.AddRange(PackageController.GetMyPackages(userId));
|
||||
|
||||
// children packages
|
||||
packages.AddRange(PackageController.GetPackages(userId));
|
||||
// change child account
|
||||
result = ChangeUserStatusInternal(child.UserId, status);
|
||||
if (result < 0)
|
||||
return result;
|
||||
}
|
||||
|
||||
PackageStatus packageStatus = PackageStatus.Active;
|
||||
switch (status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue