added a custom data manipulation function set
authorpaulr <me@pjr.cc>
Wed, 9 Feb 2011 15:34:27 +0000 (02:34 +1100)
committerpaulr <me@pjr.cc>
Wed, 9 Feb 2011 15:34:27 +0000 (02:34 +1100)
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) {