Commit b8512f53 authored by zolij's avatar zolij

tokenek konstruktorban történő átadásának lehetősége

parent 7d775be6
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment