From 8c00bd0245ca4756ca04483a4980ad202714e43e Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期四, 20 七月 2023 09:40:44 +0800
Subject: [PATCH] Merge branch 'release/v1.1.4发布'

---
 application/common/library/Auth.php |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php
index 21e4b88..6de3231 100644
--- a/application/common/library/Auth.php
+++ b/application/common/library/Auth.php
@@ -134,7 +134,7 @@
      * @param string $third_info 涓夋柟鐢ㄦ埛淇℃伅 娉�:闇�淇濇寔缁熶竴缁撴瀯
      * @return boolean
      */
-    public function register($username = '', $password, $email = '', $mobile = '', $extend = [],$third_platform="",$third_info=[])
+    public function register($username = '', $password, $email = '', $mobile = '', $extend = [],$third_platform="",$third_info=[],$pushCid="")
     {
         // 妫�娴嬬敤鎴峰悕銆佹樀绉般�侀偖绠便�佹墜鏈哄彿鏄惁瀛樺湪
         if(!empty($third_platform) && !empty($third_info)){
@@ -184,7 +184,8 @@
             'logintime' => $time,
             'loginip'   => $ip,
             'prevtime'  => $time,
-            'status'    => 'normal'
+            'status'    => 'normal',
+            'push_cid'=>$pushCid
         ]);
         //$params['password'] = $this->getEncryptPassword($password, $params['salt']);
         $params = array_merge($params, $extend);
@@ -340,7 +341,7 @@
      * @param int $user_id
      * @return boolean
      */
-    public function direct($user_id)
+    public function direct($user_id,$pushCid='')
     {
         $user = User::get($user_id);
         if ($user) {
@@ -363,6 +364,10 @@
                 //!empty(PUSH_CID) && $user->push_cid = PUSH_CID;
                 //閲嶇疆鐧诲綍澶辫触娆℃暟
                 $user->loginfailure = 0;
+                if(!empty($pushCid))
+                {
+                    $user->push_cid=$pushCid;
+                }
                 $user->save();
                 $this->_user = $user;
                 $this->_token = Random::uuid();

--
Gitblit v1.9.3