From b8512f538e2cd6ec7864f1c4076ea5e244643430 Mon Sep 17 00:00:00 2001
From: zolij <zolij86@gmail.com>
Date: Wed, 8 Jan 2014 16:36:31 +0100
Subject: [PATCH] =?UTF-8?q?tokenek=20konstruktorban=20t=C3=B6rt=C3=A9n?=
 =?UTF-8?q?=C5=91=20=C3=A1tad=C3=A1s=C3=A1nak=20lehet=C5=91s=C3=A9ge?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 php/AuthSCHClient.class.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/php/AuthSCHClient.class.php b/php/AuthSCHClient.class.php
index df0b268..8a9d6ee 100644
--- a/php/AuthSCHClient.class.php
+++ b/php/AuthSCHClient.class.php
@@ -9,10 +9,10 @@ class AuthSCHClient {
 
     private $tokens;
     
-    public function __construct($checkLogin = true) {
+    public function __construct($tokens = null) {
         $this->tokens = new stdClass();
         
-        if($checkLogin === true) {
+        if($tokens === null) {
             if(session_id() == '') {
                 // session isn't started
                 session_set_cookie_params(3600,"/");
@@ -31,6 +31,8 @@ class AuthSCHClient {
                 // load tokendata from session
                 $this->tokens = unserialize($_SESSION['tokens']);
             }
+        } else {
+            $this->tokens = $tokens;
         }
         
         return $this->tokens;
-- 
GitLab