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
app-wx/controllers/WechatController.php
... | ... | @@ -9,7 +9,7 @@ use domain\user\UserRepository; |
9 | 9 | use common\helpers\AppErrorLog; |
10 | 10 | use common\helpers\Log as AppLog; |
11 | 11 | use common\helpers\WechatMessageHelper; |
12 | -use domain\User\models\User as UserModel; | |
12 | +use domain\user\models\User as UserModel; | |
13 | 13 | use common\exts\wechat\PHPSDK as WxPHPSDK; |
14 | 14 | use common\helpers\WxHelper; |
15 | 15 | use common\helpers\ImageManager; | ... | ... |
app-wx/exts/User.php
... | ... | @@ -4,6 +4,7 @@ namespace app\wx\exts; |
4 | 4 | use Yii; |
5 | 5 | use yii\web\Cookie; |
6 | 6 | use yii\web\User as AppUser; |
7 | +use domain\user\models\User as UserModel; | |
7 | 8 | |
8 | 9 | /** |
9 | 10 | * Class User |
... | ... | @@ -72,8 +73,7 @@ class User extends AppUser |
72 | 73 | if ($id === null) { |
73 | 74 | $identity = null; |
74 | 75 | } else { |
75 | - $class = 'domain\user\Models\User'; | |
76 | - $identity = $class::findIdentity($id); | |
76 | + $identity = UserModel::findIdentity($id); | |
77 | 77 | } |
78 | 78 | $this->setIdentity($identity); |
79 | 79 | ... | ... |
domain/user/User.php
domain/user/UserRepository.php
... | ... | @@ -3,7 +3,6 @@ |
3 | 3 | namespace domain\user; |
4 | 4 | |
5 | 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 | 110 | $user = UserModel::findOne(["openid" => $openId]); |
112 | 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 | 114 | \ No newline at end of file | ... | ... |