summaryrefslogtreecommitdiff
path: root/program/include/rcube_user.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-12-28 17:17:01 +0000
committeralecpl <alec@alec.pl>2008-12-28 17:17:01 +0000
commit17060ee10b29a3631d223128d9bf8d0ddab89b5a (patch)
treed9cb006a5e7783754fd80de656a496f5e3c0ebd1 /program/include/rcube_user.php
parent3348176abaed294640761e55fedf5491bf8cddfc (diff)
#1485648: fix multiple identities from virtuser_query all set to default
Diffstat (limited to 'program/include/rcube_user.php')
-rw-r--r--program/include/rcube_user.php5
1 files changed, 4 insertions, 1 deletions
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