mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
fix: 修复账号被禁用之后还能收到推送和邮件
This commit is contained in:
parent
bcc7d6d35c
commit
88aee1e3bf
@ -124,7 +124,7 @@ class EmailNoticeTask extends AbstractTask
|
|||||||
private function sendUserEmail(int $userId, string $dialogType, Carbon $startTime, Carbon $endTime): void
|
private function sendUserEmail(int $userId, string $dialogType, Carbon $startTime, Carbon $endTime): void
|
||||||
{
|
{
|
||||||
// 验证用户
|
// 验证用户
|
||||||
$user = User::find($userId);
|
$user = User::whereDisableAt(null)->find($userId);
|
||||||
if (!$user || $user->bot || !is_null($user->disable_at) || !Base::isEmail($user->email)) {
|
if (!$user || $user->bot || !is_null($user->disable_at) || !Base::isEmail($user->email)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,6 +191,7 @@ class WebSocketDialogMsgTask extends AbstractTask
|
|||||||
}
|
}
|
||||||
$langs = User::select(['userid', 'lang'])
|
$langs = User::select(['userid', 'lang'])
|
||||||
->whereIn('userid', $umengUserid)
|
->whereIn('userid', $umengUserid)
|
||||||
|
->whereDisableAt(null)
|
||||||
->get()
|
->get()
|
||||||
->groupBy('lang')
|
->groupBy('lang')
|
||||||
->map(function($group) {
|
->map(function($group) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user