From: paulr Date: Wed, 9 Feb 2011 15:34:27 +0000 (+1100) Subject: added a custom data manipulation function set X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=commitdiff_plain;h=088c427add403ff8869d5a48d7f94615750ea2bd added a custom data manipulation function set --- diff --git a/lib/ga4php.php b/lib/ga4php.php index 125556a..22a7b2c 100644 --- a/lib/ga4php.php +++ b/lib/ga4php.php @@ -37,6 +37,20 @@ abstract class GoogleAuthenticator { return $data; } + // custom data field manipulation bits + function setCustomData($username, $data) { + $data = $this->internalGetData($username); + $data["user"] = $key; + $this->internalPutData($username, $data); + } + + function getCustomData($username) { + $data = $this->internalGetData($username); + $custom = $data["user"]; + return $custom; + + } + // an internal funciton to get data from the overloaded functions // and turn them into php arrays. function internalGetData($username) { @@ -125,6 +139,8 @@ abstract class GoogleAuthenticator { $this->internalPutData($username, ""); } + + // user has input their user name and some code, authenticate // it function authenticateUser($username, $code) {