Slightly more efficient way to open the database connections
[moodle.git] / auth / db / lib.php
index 6d9eda0..6d523d3 100644 (file)
@@ -8,8 +8,7 @@ function auth_user_login ($username, $password) {
 
     global $CFG;
 
-    ADOLoadCode($CFG->auth_dbtype);          
-    $authdb = &ADONewConnection();         
+    $authdb = &ADONewConnection($CFG->auth_dbtype);         
     $authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname); 
 
     switch ($CFG->auth_dbpasstype) {   // Re-format password accordingly