summaryrefslogtreecommitdiff
path: root/program/include/rcube_user.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_user.inc')
-rw-r--r--program/include/rcube_user.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/include/rcube_user.inc b/program/include/rcube_user.inc
index 841c84341..20c8dd827 100644
--- a/program/include/rcube_user.inc
+++ b/program/include/rcube_user.inc
@@ -241,6 +241,15 @@ class rcube_user
if (!$this->ID)
return false;
+
+ $sql_result = $DB->query("SELECT count(*) AS ident_count FROM " .
+ get_table_name('identities') .
+ " WHERE user_id = ? AND del != 1",
+ $this->ID);
+
+ $sql_arr = $DB->fetch_assoc($sql_result);
+ if ($sql_arr['ident_count'] <= 1)
+ return false;
$DB->query(
"UPDATE ".get_table_name('identities')."