diff options
| author | till <till@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-10 17:08:40 +0000 |
|---|---|---|
| committer | till <till@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-10 17:08:40 +0000 |
| commit | b1b8c9c957c59c85907339b10022b29de6515368 (patch) | |
| tree | db9cf18c8bedafe73d5e4bfaf8176a3b93a810a6 /roundcubemail/program/include | |
| parent | 9a86aba577184aea5b2b226697f42e5e9d154081 (diff) | |
* fixing #1484494 (people can delete the last identity otherwise)
* FOR TRANSLATERS: introducing new message
git-svn-id: https://svn.roundcube.net/trunk@1035 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_user.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_user.inc b/roundcubemail/program/include/rcube_user.inc index 841c84341..20c8dd827 100644 --- a/roundcubemail/program/include/rcube_user.inc +++ b/roundcubemail/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')." |
