// This code is completely untested so far - I'm just jotting down ideas ...
// Looks like it should work though ...
-$CFG->authdbhost = "localhost";
-$CFG->authdbtype = "mysql"; // (postgresql, etc)
-$CFG->authdbname = "authtest";
-$CFG->authdbtable = "users";
-$CFG->authdbuser = "user";
-$CFG->authdbpass = "pass";
-$CFG->authdbfielduser = "user";
-$CFG->authdbfieldpass = "pass";
+$CFG->auth_dbhost = "localhost";
+$CFG->auth_dbtype = "mysql"; // (postgresql, etc)
+$CFG->auth_dbname = "authtest";
+$CFG->auth_dbtable = "users";
+$CFG->auth_dbuser = "user";
+$CFG->auth_dbpass = "pass";
+$CFG->auth_dbfielduser = "user";
+$CFG->auth_dbfieldpass = "pass";
function auth_user_login ($username, $password) {
// Returns true if the username and password work
global $CFG;
- ADOLoadCode($CFG->authdbtype);
+ ADOLoadCode($CFG->auth_dbtype);
$authdb = &ADONewConnection();
- $authdb->PConnect($CFG->authdbhost,$CFG->authdbuser,$CFG->authdbpass,$CFG->authdbname);
+ $authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
- $rs = $authdb->Execute("SELECT * FROM $CFG->authdbtable
- WHERE $CFG->authdbfielduser = '$username'
- AND $CFG->authdbfieldpass = '$password' ");
+ $rs = $authdb->Execute("SELECT * FROM $CFG->auth_dbtable
+ WHERE $CFG->auth_dbfielduser = '$username'
+ AND $CFG->auth_dbfieldpass = '$password' ");
if (!$rs) {
notify("Could not connect to the specified authentication database...");
return false;