mirror of
https://github.com/bitwarden/server
synced 2025-12-23 03:33:35 +00:00
verify and disable premium from license check
This commit is contained in:
@@ -691,6 +691,11 @@ namespace Bit.Core.Services
|
||||
public async Task DisablePremiumAsync(Guid userId, DateTime? expirationDate)
|
||||
{
|
||||
var user = await _userRepository.GetByIdAsync(userId);
|
||||
await DisablePremiumAsync(user, expirationDate);
|
||||
}
|
||||
|
||||
public async Task DisablePremiumAsync(User user, DateTime? expirationDate)
|
||||
{
|
||||
if(user != null && user.Premium)
|
||||
{
|
||||
user.Premium = false;
|
||||
|
||||
Reference in New Issue
Block a user