fix: dummySession 인자 수정정
This commit is contained in:
@@ -11,7 +11,7 @@ namespace sammo;
|
|||||||
* @property bool $reqOTP 인증 코드 필요
|
* @property bool $reqOTP 인증 코드 필요
|
||||||
* @property array $acl 권한
|
* @property array $acl 권한
|
||||||
* @property string $tokenValidUntil 로그인 토큰 길이
|
* @property string $tokenValidUntil 로그인 토큰 길이
|
||||||
*
|
*
|
||||||
* @property int $generalID 장수 번호 (게임 로그인 필요)
|
* @property int $generalID 장수 번호 (게임 로그인 필요)
|
||||||
* @property string $generalName 장수 이름 (게임 로그인 필요)
|
* @property string $generalName 장수 이름 (게임 로그인 필요)
|
||||||
*/
|
*/
|
||||||
@@ -82,7 +82,7 @@ class DummySession extends Session
|
|||||||
return Util::array_get($_SESSION[$name]);
|
return Util::array_get($_SESSION[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function login(int $userID, string $userName, int $grade, bool $reqOTP, ?string $tokenValidUntil, array $acl): Session
|
public function login(int $userID, string $userName, int $grade, bool $reqOTP, ?string $tokenValidUntil, ?int $tokenID, array $acl): Session
|
||||||
{
|
{
|
||||||
$this->set('userID', $userID);
|
$this->set('userID', $userID);
|
||||||
$this->set('userName', $userName);
|
$this->set('userName', $userName);
|
||||||
@@ -92,6 +92,7 @@ class DummySession extends Session
|
|||||||
$this->set('acl', $acl);
|
$this->set('acl', $acl);
|
||||||
$this->set('reqOTP', $reqOTP);
|
$this->set('reqOTP', $reqOTP);
|
||||||
$this->set('tokenValidUntil', $tokenValidUntil);
|
$this->set('tokenValidUntil', $tokenValidUntil);
|
||||||
|
$this->set('tokenID', $tokenID);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ class DummySession extends Session
|
|||||||
if (class_exists('\\sammo\\UniqueConst')) {
|
if (class_exists('\\sammo\\UniqueConst')) {
|
||||||
$this->logoutGame();
|
$this->logoutGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set('userID', null);
|
$this->set('userID', null);
|
||||||
$this->set('userName', null);
|
$this->set('userName', null);
|
||||||
$this->set('userGrade', null);
|
$this->set('userGrade', null);
|
||||||
@@ -117,6 +118,7 @@ class DummySession extends Session
|
|||||||
$this->set('reqOTP', null);
|
$this->set('reqOTP', null);
|
||||||
$this->set('time', time());
|
$this->set('time', time());
|
||||||
$this->set('lastMsgGet', null);
|
$this->set('lastMsgGet', null);
|
||||||
|
$this->set('tokenID', null);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +198,7 @@ class DummySession extends Session
|
|||||||
} else {
|
} else {
|
||||||
$obj = self::getInstance();
|
$obj = self::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj->userGrade;
|
return $obj->userGrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,12 +214,12 @@ class DummySession extends Session
|
|||||||
} else {
|
} else {
|
||||||
$obj = self::getInstance();
|
$obj = self::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj->userID;
|
return $obj->userID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function getGeneralID(bool $requireLogin = false, string $exitPath = '..')
|
public static function getGeneralID(bool $requireLogin = false, string $exitPath = '..')
|
||||||
{
|
{
|
||||||
@@ -226,7 +228,7 @@ class DummySession extends Session
|
|||||||
} else {
|
} else {
|
||||||
$obj = self::getInstance();
|
$obj = self::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj->generalID??0;
|
return $obj->generalID??0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +246,7 @@ class DummySession extends Session
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->userID) {
|
if ($this->userID) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user