Fixes unsubscribing from static events on Terminate
This commit is contained in:
@@ -47,7 +47,19 @@ namespace Umbraco.Core.Compose
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{ }
|
||||
{
|
||||
UserService.SavedUserGroup -= OnSavedUserGroupWithUsers;
|
||||
|
||||
UserService.SavedUser -= OnSavedUser;
|
||||
UserService.DeletedUser -= OnDeletedUser;
|
||||
UserService.UserGroupPermissionsAssigned -= UserGroupPermissionAssigned;
|
||||
|
||||
MemberService.Saved -= OnSavedMember;
|
||||
MemberService.Deleted -= OnDeletedMember;
|
||||
MemberService.AssignedRoles -= OnAssignedRoles;
|
||||
MemberService.RemovedRoles -= OnRemovedRoles;
|
||||
MemberService.Exported -= OnMemberExported;
|
||||
}
|
||||
|
||||
public static IUser UnknownUser(IGlobalSettings globalSettings) => new User(globalSettings) { Id = Constants.Security.UnknownUserId, Name = Constants.Security.UnknownUserName, Email = "" };
|
||||
|
||||
|
||||
@@ -38,7 +38,19 @@ namespace Umbraco.Web.Compose
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{ }
|
||||
{
|
||||
//BackOfficeUserManager.AccountLocked -= ;
|
||||
//BackOfficeUserManager.AccountUnlocked -= ;
|
||||
BackOfficeOwinUserManager.ForgotPasswordRequested -= OnForgotPasswordRequest;
|
||||
BackOfficeOwinUserManager.ForgotPasswordChangedSuccess -= OnForgotPasswordChange;
|
||||
BackOfficeOwinUserManager.LoginFailed -= OnLoginFailed;
|
||||
//BackOfficeUserManager.LoginRequiresVerification -= ;
|
||||
BackOfficeOwinUserManager.LoginSuccess -= OnLoginSuccess;
|
||||
BackOfficeOwinUserManager.LogoutSuccess -= OnLogoutSuccess;
|
||||
BackOfficeOwinUserManager.PasswordChanged -= OnPasswordChanged;
|
||||
BackOfficeOwinUserManager.PasswordReset -= OnPasswordReset;
|
||||
//BackOfficeUserManager.ResetAccessFailedCount -= ;
|
||||
}
|
||||
|
||||
private IUser GetPerformingUser(int userId)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,9 @@ namespace Umbraco.Web.Logging
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{ }
|
||||
{
|
||||
UmbracoApplicationBase.ApplicationInit -= InitializeApplication;
|
||||
}
|
||||
|
||||
private void InitializeApplication(object sender, EventArgs args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user