fixed a minor thing with the hotp skew
[ga4php.git] / authserver / lib / lib.php
index eb4fc64..dbdd35f 100644 (file)
@@ -12,6 +12,7 @@ define("MSG_SET_USER_PASSWORD", 5);
 define("MSG_SET_USER_REALNAME", 6);
 define("MSG_SET_USER_TOKEN", 7);
 define("MSG_SET_USER_TOKEN_TYPE", 8);
+define("MSG_GET_USERS", 9);
 
 if(file_exists("../../lib/ga4php.php")) require_once("../../lib/ga4php.php");
 if(file_exists("../lib/ga4php.php")) require_once("../lib/ga4php.php");
@@ -43,6 +44,7 @@ function closeDatabase($db) {
 
 class gaasGA extends GoogleAuthenticator {
        function getData($username) {
+               echo "called into getdata\n";
                
                // get our database connection
                $dbObject = getDatabase();
@@ -54,14 +56,17 @@ class gaasGA extends GoogleAuthenticator {
                $result = $dbObject->query($sql);
                
                // check the result
+               echo "next1\n";
                if(!$result) return false;
                
                // now just retreieve all the data (there should only be one, but whatever)
+               echo "next2\n";
                $tokendata = false;
                foreach($result as $row) {
                        $tokendata = $row["users_tokendata"];
                }
-               
+
+               echo "next3, $username, $tokendata\n";
                // now we have our data, we just return it. If we got no data
                // we'll just return false by default
                return $tokendata;
@@ -117,4 +122,4 @@ class gaasGA extends GoogleAuthenticator {
        }       
 }
 
-?>
\ No newline at end of file
+?>