Skip to content
Snippets Groups Projects
Commit b8512f53 authored by Janega Zoltán's avatar Janega Zoltán
Browse files

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

parent 7d775be6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment