From 17060ee10b29a3631d223128d9bf8d0ddab89b5a Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 28 Dec 2008 17:17:01 +0000 Subject: #1485648: fix multiple identities from virtuser_query all set to default --- program/include/rcube_user.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'program/include/rcube_user.php') diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php index 00f5cd7c4..64d2c758a 100644 --- a/program/include/rcube_user.php +++ b/program/include/rcube_user.php @@ -377,15 +377,18 @@ class rcube_user && ($sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($user), $virtuser_query))) && ($dbh->num_rows() > 0)) { + $standard = 1; while ($sql_arr = $dbh->fetch_array($sql_result)) { $dbh->query( "INSERT INTO ".get_table_name('identities')." (user_id, del, standard, name, email) - VALUES (?, 0, 1, ?, ?)", + VALUES (?, 0, ?, ?, ?)", $user_id, + $standard, strip_newlines($user_name), preg_replace('/^@/', $user . '@', $sql_arr[0])); + $standard = 0; } } else -- cgit v1.2.3