CheckLogin을 다시 구현.
- ajax 함수에서는 사용해선 안됨. - 이외에선 index에서만 제대로 장수삭제처리를 하므로 문제 없을 것.
This commit is contained in:
+7
-11
@@ -2,18 +2,14 @@
|
||||
namespace sammo;
|
||||
|
||||
|
||||
function CheckLogin($type=0) {
|
||||
//TODO: 직접해라. setReadOnly() 호출이 필요하다.
|
||||
if(Session::Instance()->loginGame()->generalID){
|
||||
return;
|
||||
function CheckLoginWithGeneralID() {
|
||||
$session = Session::requireLogin()->loginGame()->setReadOnly();
|
||||
$generalID = $session->generalID;
|
||||
if($generalID){
|
||||
return $generalID;
|
||||
}
|
||||
if($type == 0) {
|
||||
header('Location: ../');
|
||||
}
|
||||
else {
|
||||
header('Location: index.php');
|
||||
}
|
||||
exit();
|
||||
header('Locatoin:..');
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user