diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php
index f0dde6ae0e8fa335cb79c31c315de19a4ed9f478..6d79c54300b5ba958bd51471f1d72ec049e5604a 100644
--- a/inc/auth/mysql.class.php
+++ b/inc/auth/mysql.class.php
@@ -67,9 +67,12 @@ class auth_mysql extends auth_basic {
         $sql    = str_replace('%g',addslashes($this->defaultgroup),$sql);
         $result = $this->queryDB($sql);
       
-        if($result !== false && count($result) == 1)
-          $rc = $cnf['encryptPass'] ? true : auth_verifyPassword($pass,$result[0]['pass']);
-		  
+        if($result !== false && count($result) == 1) {
+          if($this->cnf['encryptPass'] == 1)
+            $rc = true;
+          else
+            $rc = auth_verifyPassword($pass,$result[0]['pass']);
+        }
         $this->closeDB();
       }
       return $rc;