mirror of
https://github.com/v2board/v2board.git
synced 2025-02-25 14:50:26 +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)
|
private function remindTrafficIsWarnValue($ud, $transfer_enable)
|
||||||
{
|
{
|
||||||
if ($ud <= 0) return false;
|
if (!$ud) return false;
|
||||||
if (!$transfer_enable) return false;
|
if (!$transfer_enable) return false;
|
||||||
$percentage = ($ud / $transfer_enable) * 100;
|
$percentage = ($ud / $transfer_enable) * 100;
|
||||||
if ($percentage < 80) return false;
|
if ($percentage < 80) return false;
|
||||||
|
@ -88,8 +88,12 @@ class UserService
|
|||||||
if (!$user->save()) {
|
if (!$user->save()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$mailService = new MailService();
|
try {
|
||||||
$mailService->remindTraffic($user);
|
$mailService = new MailService();
|
||||||
|
$mailService->remindTraffic($user);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user