feat(users): add suspended user warning

This commit is contained in:
2022-08-19 02:08:39 +01:00
parent 0f4ce2d7b0
commit 075e9492c3
4 changed files with 27 additions and 2 deletions

View File

@@ -124,7 +124,13 @@ class AccountSuspensionService
return ($this->isSuspended($user)) ? $user->bans->reason : false;
}
public function getSuspensionDuration(User $user): string|null {
if ($this->isSuspended($user)) {
return $user->bans->bannedUntil->diffForHumans();
}
return null;
}
/**
* Checks whether an account is locked
*