Commit d25e945b9d36659df1f1d7516a1bb18ad7bb0865
1 parent
ae88ab85
Exists in
master
1.命名空间大小写修复。
Showing
6 changed files
with
7 additions
and
20 deletions
Show diff stats
app-wx/controllers/SiteController.php
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | namespace app\wx\controllers; | 2 | namespace app\wx\controllers; |
3 | 3 | ||
4 | use Yii; | 4 | use Yii; |
5 | -use domain\User\models\User as UserModel; | 5 | +use domain\user\models\User as UserModel; |
6 | use common\helpers\WxHelper; | 6 | use common\helpers\WxHelper; |
7 | use common\models\SysSetting; | 7 | use common\models\SysSetting; |
8 | 8 |
app-wx/controllers/WechatController.php
@@ -9,7 +9,7 @@ use domain\user\UserRepository; | @@ -9,7 +9,7 @@ use domain\user\UserRepository; | ||
9 | use common\helpers\AppErrorLog; | 9 | use common\helpers\AppErrorLog; |
10 | use common\helpers\Log as AppLog; | 10 | use common\helpers\Log as AppLog; |
11 | use common\helpers\WechatMessageHelper; | 11 | use common\helpers\WechatMessageHelper; |
12 | -use domain\User\models\User as UserModel; | 12 | +use domain\user\models\User as UserModel; |
13 | use common\exts\wechat\PHPSDK as WxPHPSDK; | 13 | use common\exts\wechat\PHPSDK as WxPHPSDK; |
14 | use common\helpers\WxHelper; | 14 | use common\helpers\WxHelper; |
15 | use common\helpers\ImageManager; | 15 | use common\helpers\ImageManager; |
app-wx/exts/User.php
@@ -4,6 +4,7 @@ namespace app\wx\exts; | @@ -4,6 +4,7 @@ namespace app\wx\exts; | ||
4 | use Yii; | 4 | use Yii; |
5 | use yii\web\Cookie; | 5 | use yii\web\Cookie; |
6 | use yii\web\User as AppUser; | 6 | use yii\web\User as AppUser; |
7 | +use domain\user\models\User as UserModel; | ||
7 | 8 | ||
8 | /** | 9 | /** |
9 | * Class User | 10 | * Class User |
@@ -72,8 +73,7 @@ class User extends AppUser | @@ -72,8 +73,7 @@ class User extends AppUser | ||
72 | if ($id === null) { | 73 | if ($id === null) { |
73 | $identity = null; | 74 | $identity = null; |
74 | } else { | 75 | } else { |
75 | - $class = 'domain\user\Models\User'; | ||
76 | - $identity = $class::findIdentity($id); | 76 | + $identity = UserModel::findIdentity($id); |
77 | } | 77 | } |
78 | $this->setIdentity($identity); | 78 | $this->setIdentity($identity); |
79 | 79 |
domain/user/User.php
domain/user/UserRepository.php
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | namespace domain\user; | 3 | namespace domain\user; |
4 | 4 | ||
5 | use domain\user\models\User as UserModel; | 5 | use domain\user\models\User as UserModel; |
6 | -use yii\base\NotSupportedException; | ||
7 | 6 | ||
8 | 7 | ||
9 | /** | 8 | /** |
@@ -111,16 +110,4 @@ class UserRepository | @@ -111,16 +110,4 @@ class UserRepository | ||
111 | $user = UserModel::findOne(["openid" => $openId]); | 110 | $user = UserModel::findOne(["openid" => $openId]); |
112 | return $user; | 111 | return $user; |
113 | } | 112 | } |
114 | - | ||
115 | - /** @inheritdoc */ | ||
116 | - public static function findIdentity($condition) | ||
117 | - { | ||
118 | - return UserModel::findByCondition($condition)->one(); | ||
119 | - } | ||
120 | - | ||
121 | - /** @inheritdoc */ | ||
122 | - public static function findIdentityByAccessToken($token, $type = null) | ||
123 | - { | ||
124 | - throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.'); | ||
125 | - } | ||
126 | } | 113 | } |
127 | \ No newline at end of file | 114 | \ No newline at end of file |