X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=authserver%2Flib%2Flib.php;h=02be05934f550accd89dd7ce6a56a09784e4a3aa;hp=689389a5079dcd8668bb111dc4e910df942aebb0;hb=d4590a3f34021216c9da29786922fddaf804d113;hpb=1438f7f5c47f3f5c55bc8e13aa566530840e0310 diff --git a/authserver/lib/lib.php b/authserver/lib/lib.php index 689389a..02be059 100644 --- a/authserver/lib/lib.php +++ b/authserver/lib/lib.php @@ -15,10 +15,10 @@ define("MSG_SET_USER_TOKEN_TYPE", 8); define("MSG_GET_USERS", 9); define("MSG_GET_OTK_PNG", 10); define("MSG_GET_OTK_ID", 11); +define("MSG_DELETE_USER_TOKEN", 12); -if(file_exists("../../lib/ga4php.php")) require_once("../../lib/ga4php.php"); -if(file_exists("../lib/ga4php.php")) require_once("../lib/ga4php.php"); - +// messy +require_once(dirname(__FILE__)."/../../lib/ga4php.php"); function generateRandomString() { @@ -100,9 +100,11 @@ class gaasGA extends GoogleAuthenticator { $res = $dbObject->query($sql); if($res->fetchColumn() > 0) { // do update + error_log("doing userdata update"); $sql = "update users set users_tokendata='$data' where users_username='$username'"; } else { // do insert + error_log("doing user data create"); $sql = "insert into users values (NULL, '$username', '', '', '$data', '')"; }