lizhi 3 hónapja
szülő
commit
cb11599620

+ 1 - 4
protected/components/RedisInstance.php

@@ -1176,10 +1176,7 @@ class RedisInstance extends \CCache
             $ret = $this->_redis->auth($this->_conf['password']);
         }
 
-        // 这里防止测试环境redis串数据
-        if (LWM_ENV == 'dev') {
-            $this->_redis->select(1);
-        }
+        $this->_redis->select(3);
 
         //序列化
         $this->_redis->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP);

+ 1 - 1
protected/controllers/SiteController.php

@@ -35,7 +35,7 @@ class SiteController extends Controller
         }
         $token = Helper::getRandomString(32);
         RedisInstance::getInstance()->set('user_token:'.$token, ['id' => $user['id']], 86400);
-        $this->clearAuth();
+        $this->clearAuth($user['id']);
         Helper::ok(['token' => $token, 'refreshToken' => '']);
 	}