mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
fix: bug
This commit is contained in:
parent
1d92d6b2f9
commit
93c90ddaf0
@ -29,7 +29,7 @@ class MailService
|
||||
|
||||
private function remindTrafficIsWarnValue($ud, $transfer_enable)
|
||||
{
|
||||
if ($ud <= 0) return false;
|
||||
if (!$ud) return false;
|
||||
if (!$transfer_enable) return false;
|
||||
$percentage = ($ud / $transfer_enable) * 100;
|
||||
if ($percentage < 80) return false;
|
||||
|
@ -88,8 +88,12 @@ class UserService
|
||||
if (!$user->save()) {
|
||||
return false;
|
||||
}
|
||||
$mailService = new MailService();
|
||||
$mailService->remindTraffic($user);
|
||||
try {
|
||||
$mailService = new MailService();
|
||||
$mailService->remindTraffic($user);
|
||||
} catch (\Exception $e) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user