We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b88a05f commit bfa6047Copy full SHA for bfa6047
src/oauth/AuthAction.php
@@ -4,6 +4,7 @@
4
* @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd.
5
* @license http://www.tintsoft.com/license/
6
*/
7
+
8
namespace xutl\wechat\oauth;
9
10
use Yii;
@@ -50,7 +51,11 @@ class AuthAction extends \yii\authclient\AuthAction
50
51
52
public function run()
53
{
- $client = Yii::$app->wechat->oauth;
54
- return $this->auth($client);
+ if (Yii::$app->user->isGuest) {
55
+ $client = Yii::$app->wechat->oauth;
56
+ return $this->auth($client);
57
+ } else {
58
+ return $this->controller->goHome();
59
+ }
60
}
61
0 commit comments