diff --git a/src/CustomAJAXChat.php b/src/CustomAJAXChat.php index 565a253..2493b09 100644 --- a/src/CustomAJAXChat.php +++ b/src/CustomAJAXChat.php @@ -13,11 +13,15 @@ class CustomAJAXChat extends AJAXChat { // Returns null if login is invalid function getValidLoginUserData() { if(empty($_COOKIE['msz_auth'])) { - header('Location: https://flashii.net/auth/login.php'); + header('Location: ' . $this->getConfig('flashiiAuth', 'login')); exit; } - $userInfo = SockChatAuth::attempt($this->getConfig('flashiiSecret'), (string)filter_input(INPUT_COOKIE, 'msz_auth')); + $userInfo = SockChatAuth::attempt( + $this->getConfig('flashiiAuth', 'verify'), + $this->getConfig('flashiiSecret'), + (string)filter_input(INPUT_COOKIE, 'msz_auth') + ); if($userInfo->success) { // Check if we have a valid registered user: diff --git a/src/SockChatAuth.php b/src/SockChatAuth.php index a02a642..d126410 100644 --- a/src/SockChatAuth.php +++ b/src/SockChatAuth.php @@ -1,8 +1,6 @@ false, CURLOPT_FAILONERROR => false,