summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-05 06:42:36 +0000
committeralecpl <alec@alec.pl>2009-09-05 06:42:36 +0000
commit3dd90d323ddf11c271cb6f95d5f8f77c44253869 (patch)
tree836a9bb1689eb0175379f2087855673a9f1cb155
parentd9b9369c5718720845ec6950c6d0fb014ae4e629 (diff)
- Password Plugin: Fix %d inserts username instead of domain (#1486088)
-rw-r--r--CHANGELOG1
-rw-r--r--plugins/password/drivers/sql.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5a85022e7..9d72a4aba 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Password Plugin: Fix %d inserts username instead of domain (#1486088)
- Fix rcube_mdb2::affected_rows() (#1486082)
RELEASE 0.3-stable
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index 9afaa65d8..1e737f233 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -5,7 +5,7 @@
*
* Driver for passwords stored in SQL database
*
- * @version 1.2
+ * @version 1.3
* @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
*
*/
@@ -81,7 +81,7 @@ function password_save($curpass, $passwd)
$user_info = explode('@', $_SESSION['username']);
if (count($user_info) >= 2) {
$sql = str_replace('%l', $db->quote($user_info[0], 'text'), $sql);
- $sql = str_replace('%d', $db->quote($user_info[0], 'text'), $sql);
+ $sql = str_replace('%d', $db->quote($user_info[1], 'text'), $sql);
}
$sql = str_replace('%u', $db->quote($_SESSION['username'],'text'), $sql);