added a custom data manipulation function set
[ga4php.git] / lib / ga4php.php
index 125556a..22a7b2c 100644 (file)
@@ -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) {