From fe571cc5de93a349ed5cf0e208d0b6704f9e3104 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 12 Feb 2018 17:10:51 +0900 Subject: [PATCH] Update security.php --- system/security.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/security.php b/system/security.php index 7bc9f8f..a9c6fb3 100644 --- a/system/security.php +++ b/system/security.php @@ -51,3 +51,10 @@ if(!function_exists("check_token_abuse_by_requests")) { return check_token_abuse($requests['_POST'][$name], $_SESSION[$name]); } } + +if(!function_exists("session_safe_login")) { + function session_safe_login($user_name) { + $_SESSION['ss_user_name'] = $user_name; + $_SESSION['ss_key'] = make_random_id(10); + } +}