summaryrefslogtreecommitdiff
path: root/plugins/password/drivers/sql.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-03-07 07:52:35 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-03-07 07:52:35 +0000
commit4ae9a39aabee5816b6321d24e771ddb56d824ab7 (patch)
tree602b0a5917555d3637c7a07d77ac28b068f88ac9 /plugins/password/drivers/sql.php
parentb8c247a8773b945369a5858275c86e2448cdc7db (diff)
- When old and new passwords are the same, do nothing, return success (#1487823)
git-svn-id: https://svn.roundcube.net/trunk@4595 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password/drivers/sql.php')
-rw-r--r--plugins/password/drivers/sql.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index 33469ec62..9ea33df2f 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -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?
}
}