src/Wechat.php
public function getUser()
    {
        if (!$this->isAuthorized())
        {
            return new WechatUser();
        }

        if (! self::$_user instanceof WechatUser)
        {
            $userInfo = Yii::$app->session->get($this->sessionParam);
            $config = $userInfo ? json_decode($userInfo, true) : [];
            self::$_user = new WechatUser($config);
        }
        return self::$_user;
    }
public function getUser()
    {
        if (!$this->isAuthorized())
        {
            return new WechatUser();
        }

        if (! self::$_user instanceof WechatUser)
        {
            $userInfo = Yii::$app->session->get($this->sessionParam);
            $config = $userInfo ? json_decode($userInfo, true) : [];
            self::$_user = new WechatUser($config);
        }
        return self::$_user;
    }
获取微信身份信息

@return WechatUser