lgy 2 weeks ago
parent
commit
321d34d953
1 changed files with 2 additions and 2 deletions
  1. 2 2
      jcjyhr/app/admin/model/AdminLog.php

+ 2 - 2
jcjyhr/app/admin/model/AdminLog.php

@@ -117,8 +117,8 @@ class AdminLog extends Model
     public function record(string $title = '', string|array $data = null): void
     {
         $auth     = Auth::instance();
-        $adminId  = $auth->isLogin() ? $auth->id : 0;
-        $username = $auth->isLogin() ? $auth->username : request()->param('username', __('Unknown'));
+        $adminId  = $auth->isLogin() ? $auth->ID : 0;
+        $username = $auth->isLogin() ? $auth->USERNAME : request()->param('username', __('Unknown'));
 
         $controller = str_replace('.', '/', request()->controller(true));
         $action     = request()->action(true);