]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Autologin was broken.
authorWill Budicm <redacted>
Thu, 24 Dec 2020 02:13:30 +0000 (13:13 +1100)
committerWill Budicm <redacted>
Thu, 24 Dec 2020 02:13:30 +0000 (13:13 +1100)
htdocs/cgi-bin/login_ctr.cgi
htdocs/cgi-bin/system/modules/Settings.pm

index d277ac96b7a5e0350fa5b6ab3e4bab49bbc3f388..4630bbdf753c422adccad0e0405e2426ea6a74ca 100755 (executable)
@@ -167,7 +167,7 @@ sub checkAutologinSet {
                 return;                                # Note, we do assign entered password even passw as autologin is set. Not entering one bypasses this.
             }                                          # If stricter access is required set it to zero in main.cnf, or disable in config.
             $passw = $cre[1] if (!$passw);
-            $db = Settings::connectDB($DB_NAME, $alias, $passw);            
+            $db = Settings::connectDB($alias, $passw);            
             #check if autologin enabled.
             my $st = Settings::selectRecords($db,"SELECT VALUE FROM CONFIG WHERE NAME='AUTO_LOGIN';");                        
             if($st){my @set = $st->fetchrow_array();
index 2838d0de00751defd5fc61685dce600472ddc189..790dcb824e2f8ebf18e4acc5754dc684c00797cf 100644 (file)
@@ -622,7 +622,7 @@ sub connectDB {
     $p = $alias if(!$p);
     my $db =$u;
     if(!$d){$db = 'data_'.$u.'_log.db';$d=$u}
-    else{   $db = 'data_'.$d.'_log.db';}
+    else{   $db = 'data_'.$d.'_log.db';$dbname = $d if !$dbname}
     $DBFILE = $LOG_PATH.$db;
         if ($IS_PG_DB)  {
             $DSN = $DBI_SOURCE .'dbname='.$d;