Skip to content

Commit e33523e

Browse files
authored
Revert automatically disallowing email address when deleting user (#1055)
Now that I have thought about this again, this is not a good idea. A user should not "be disallowed" by email if they have deleted their own account. Automatic email blocking should only be done if a moderator deletes an account, and even then it should be optional (for example, a user might ask a moderator to delete their account because they cannot do so themselves, instead of account deletion being necessary due to moderation).
2 parents 4f1aa5c + cd248c4 commit e33523e

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Refresh.Database/GameDatabaseContext.Users.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,6 @@ public void DeleteUser(GameUser user)
402402
this.BanUser(user, deletedReason, DateTimeOffset.MaxValue);
403403
this.RevokeAllTokensForUser(user);
404404
this.DeleteNotificationsByUser(user);
405-
if (user.EmailAddress != null)
406-
this.DisallowEmail(user.EmailAddress);
407405

408406
this.Write(() =>
409407
{

RefreshTests.GameServer/Tests/Users/UserActionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void CanResetOwnIcon(string newIcon)
8383
}
8484

8585
[Test]
86-
public void DeletingUserDisallowsEmail()
86+
public void DeletingUserDoesNotDisallowEmail()
8787
{
8888
using TestContext context = this.GetServer();
8989
GameUser publisher = context.CreateUser();
@@ -95,6 +95,6 @@ public void DeletingUserDisallowsEmail()
9595
context.Database.DeleteUser(publisher);
9696
context.Database.Refresh();
9797

98-
Assert.That(context.Database.IsEmailDisallowed(email), Is.True);
98+
Assert.That(context.Database.IsEmailDisallowed(email), Is.False);
9999
}
100100
}

0 commit comments

Comments
 (0)