pull/43/head
杨赟 2 years ago
parent 6ebd628712
commit c61dd5910e

@ -126,7 +126,7 @@ class Callback extends Controller
$code = Request::instance()->get('code'); $code = Request::instance()->get('code');
$api = new Api(config('wework.corpId'), config('wework.corpSecret')); $api = new Api(config('wework.corpId'), config('wework.corpSecret'));
$userInfo = $api->getUserInfo($code); $userInfo = $api->getUserInfo($code);
if ($userInfo['userid']) { if (isset($userInfo['userid']) && $userInfo['userid']) {
Session::set('wxuser_id', $userInfo['userid']); Session::set('wxuser_id', $userInfo['userid']);
$adminUser = db('admin_user')->where('wxwork_id', $userInfo['userid'])->find(); $adminUser = db('admin_user')->where('wxwork_id', $userInfo['userid'])->find();
if ($adminUser) { if ($adminUser) {

Loading…
Cancel
Save