mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 17:37:23 +08:00
add-trans
This commit is contained in:
+7
-1
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
# IMPORTANT: Do not edit below unless you know what you are doing!
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
if(!defined('IN_TRACKER'))
|
||||
die('Hacking attempt!');
|
||||
|
||||
@@ -207,7 +209,11 @@ function delete_user(\Illuminate\Database\Eloquent\Builder $query, $reasonKey)
|
||||
'reason' => nexus_trans($reasonKey, [], $user->locale),
|
||||
];
|
||||
}
|
||||
\App\Models\User::query()->whereIn('id', $uidArr)->delete();
|
||||
$update = [
|
||||
'enabled' => \App\Models\User::ENABLED_NO,
|
||||
'modcomment' => DB::raw("concat_ws('\n', '[CLEANUP] $reasonKey', modcomment)"),
|
||||
];
|
||||
\App\Models\User::query()->whereIn('id', $uidArr)->update($update);
|
||||
\App\Models\UserBanLog::query()->insert($userBanLogData);
|
||||
do_log("delete user($reasonKey): " . implode(', ', $uidArr));
|
||||
return $uidArr;
|
||||
|
||||
Reference in New Issue
Block a user