feat(users): add suspended user warning
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user