mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
seed bonus add log etc
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Enums\ModelEventEnum;
|
||||
use App\Enums\RedisKeysEnum;
|
||||
use App\Exceptions\InsufficientPermissionException;
|
||||
use App\Exceptions\NexusException;
|
||||
use App\Http\Resources\ExamUserResource;
|
||||
@@ -252,9 +253,15 @@ class UserRepository extends BaseRepository
|
||||
do_log("user: $uid, $modCommentText, update: " . nexus_json_encode($update));
|
||||
$this->clearCache($targetUser);
|
||||
fire_event("user_enabled", $targetUser);
|
||||
$this->setEnableLatelyCache($targetUser->id);
|
||||
return true;
|
||||
}
|
||||
|
||||
private function setEnableLatelyCache(int $userId): void
|
||||
{
|
||||
NexusDB::cache_put(User::getUserEnableLatelyCacheKey($userId), now()->toDateTimeString());
|
||||
}
|
||||
|
||||
public function getInviteInfo($id)
|
||||
{
|
||||
$user = User::query()->findOrFail($id, ['id']);
|
||||
|
||||
Reference in New Issue
Block a user