瀏覽代碼

added current user injection

tags/0.1.0
Robin Thoni 9 年之前
父節點
當前提交
bc94b2aa6b
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      src/Auth/Business/LuticateBusiness.php

+ 4
- 1
src/Auth/Business/LuticateBusiness.php 查看文件

@@ -10,11 +10,12 @@ namespace Luticate\Auth\Business;
10 10
 
11 11
 use Illuminate\Http\Request;
12 12
 use Luticate\Auth\DBO\LuticateUsersDbo;
13
+use Luticate\Utils\LuController;
13 14
 use Luticate\Utils\LuRoute;
14 15
 
15 16
 class LuticateBusiness
16 17
 {
17
-    const TOKEN_HEADER = "X-Authentication";
18
+    const TOKEN_HEADER = "X-Authorization";
18 19
 
19 20
     /**
20 21
      * @var LuticateUsersDbo
@@ -42,6 +43,8 @@ class LuticateBusiness
42 43
             }
43 44
         }
44 45
 
46
+        LuController::$parameters["user"] = self::$_currentUser;
47
+
45 48
         if (self::$_currentUser == null && count($permissions) != 0) {
46 49
             return false;
47 50
         }

Loading…
取消
儲存