From 6ef0b2189376de8f64e301cad3d13f4f7f2c5b03 Mon Sep 17 00:00:00 2001 From: star7th Date: Wed, 30 Oct 2024 03:55:39 +0800 Subject: [PATCH] update --- .../Application/Api/Controller/ExtLoginController.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/Application/Api/Controller/ExtLoginController.class.php b/server/Application/Api/Controller/ExtLoginController.class.php index 8b670b0ac..5ddf1bf74 100644 --- a/server/Application/Api/Controller/ExtLoginController.class.php +++ b/server/Application/Api/Controller/ExtLoginController.class.php @@ -178,6 +178,10 @@ public function oauth2() if (!$info) { D("User")->register($username, md5($username . time() . rand())); $info = D("User")->where("username='%s'", array($username))->find(); + if($res_array['name']){ + D("User")->where("username='%s'", array($username))->save(array("name" =>$res_array['name'])); + } + } D("User")->setLastTime($info['uid']);