X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=lib%2Fga4php.php;fp=lib%2Fga4php.php;h=a0525754d0363d20183bed92c73de5ab7672c60f;hp=2be25ff2828e56c460187e1281ad112004b616df;hb=2e2593d79cc3b24e0db34ec434e7f4383cf3651d;hpb=3354ed0d5c9f3877ac2222ac25326acd05d3d236 diff --git a/lib/ga4php.php b/lib/ga4php.php index 2be25ff..a052575 100644 --- a/lib/ga4php.php +++ b/lib/ga4php.php @@ -53,7 +53,8 @@ abstract class GoogleAuthenticator { // the function used inside the class to put the data into the // datastore using the overloaded data saving class function internalPutData($username, $data) { - $enco = base64_encode(serialize($data)); + if($data == "") $enco = ""; + else $enco = base64_encode(serialize($data)); return $this->putData($username, $enco); } @@ -118,9 +119,7 @@ abstract class GoogleAuthenticator { // self explanitory? function deleteUser($username) { // oh, we need to figure out how to do thi? - $data = $this->internalGetData($username); - $data["tokenkey"] = ""; - $this->internalPutData($username); + $this->internalPutData($username, ""); } // user has input their user name and some code, authenticate