]> git.donarmstrong.com Git - roundcube.git/blobdiff - plugins/password/drivers/sql.php
Imported Upstream version 0.6+dfsg
[roundcube.git] / plugins / password / drivers / sql.php
index 33469ec622790cc2142a0f3b7f9c4874591a4fa6..9ea33df2f4bbb49852a411fb1c8294b7ba67072a 100644 (file)
@@ -137,9 +137,12 @@ function password_save($curpass, $passwd)
            if (strtolower(substr(trim($query),0,6))=='select') {
            if ($result = $db->fetch_array($res))
                        return PASSWORD_SUCCESS;
-           } else { 
+           } else {
+            // This is the good case: 1 row updated
            if ($db->affected_rows($res) == 1)
-                       return PASSWORD_SUCCESS; // This is the good case: 1 row updated
+                   return PASSWORD_SUCCESS;
+            // @TODO: Some queries don't affect any rows
+            // Should we assume a success if there was no error?
            }
     }