mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 17:19:59 +09:00
Fix typo in variable name
This commit is contained in:
parent
d21990d322
commit
a74daeb071
1 changed files with 6 additions and 6 deletions
|
|
@ -484,9 +484,9 @@ class Session
|
||||||
*/
|
*/
|
||||||
public static function createToken($key = null)
|
public static function createToken($key = null)
|
||||||
{
|
{
|
||||||
$token_id = Security::getRandom(16, 'alnum');
|
$token = Security::getRandom(16, 'alnum');
|
||||||
$_SESSION['RHYMIX']['tokens'][$token_id] = strval($key);
|
$_SESSION['RHYMIX']['tokens'][$token] = strval($key);
|
||||||
return $token_id;
|
return $token;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -500,7 +500,7 @@ class Session
|
||||||
*/
|
*/
|
||||||
public static function verifyToken($token, $key = null)
|
public static function verifyToken($token, $key = null)
|
||||||
{
|
{
|
||||||
if (isset($_SESSION['RHYMIX']['tokens'][$token_id]) && $_SESSION['RHYMIX']['tokens'][$token_id] === strval($key))
|
if (isset($_SESSION['RHYMIX']['tokens'][$token]) && $_SESSION['RHYMIX']['tokens'][$token] === strval($key))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -519,9 +519,9 @@ class Session
|
||||||
*/
|
*/
|
||||||
public static function invalidateToken($token)
|
public static function invalidateToken($token)
|
||||||
{
|
{
|
||||||
if (isset($_SESSION['RHYMIX']['tokens'][$token_id]))
|
if (isset($_SESSION['RHYMIX']['tokens'][$token]))
|
||||||
{
|
{
|
||||||
unset($_SESSION['RHYMIX']['tokens'][$token_id]);
|
unset($_SESSION['RHYMIX']['tokens'][$token]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue