로그인, 로그아웃시 member_log에 기록 남김

This commit is contained in:
2018-03-25 17:19:07 +09:00
parent 13ee593548
commit 503ad43a9e
4 changed files with 51 additions and 8 deletions
+13
View File
@@ -4,6 +4,15 @@ namespace sammo;
if(!defined('ROOT')){
define('ROOT', '../..');
}
/**
* Session Wrapper. 내부적으로 $_SESSION을 이용
*
* @property int $userID 유저코드
* @property string $userName 유저명
* @property int $userGrade 유저등급
* @property string $ip IP
*/
class Session {
const PROTECTED_NAMES = [
@@ -15,6 +24,8 @@ class Session {
'writeClosed'=>true
];
private $writeClosed = false;
/**
@@ -99,6 +110,7 @@ class Session {
$this->set('ip', Util::get_client_ip(true));
$this->set('time', time());
$this->set('userGrade', $grade);
return $this;
}
public function logout() {
@@ -106,6 +118,7 @@ class Session {
$this->set('userName', null);
$this->set('userGrade', null);
$this->set('time', time());
return $this;
}
/**