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']);