diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-03 20:17:04 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-03 20:17:04 +0000 |
| commit | 30515b04bae17fd85c7f78c837e7f6d53ee2405a (patch) | |
| tree | 4ffa5523a47276e48f9838fd01c1e6b88eaf4809 /roundcubemail/program | |
| parent | 52be1875ee7ee29ecf851ab33e9b92e97657a851 (diff) | |
Minor bugfixes and SMTP support
git-svn-id: https://svn.roundcube.net/trunk@16 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index ebf2f2685..7b34bf632 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -303,15 +303,17 @@ function rcmail_create_user($user, $host) if ($user_id = $DB->insert_id()) { + $user_email = strstr($user, '@') ? $user : sprintf('%s@%s', $user, $host); + $user_name = $user!=$user_email ? $user : ''; + // also create a new identity record $DB->query(sprintf("INSERT INTO %s (user_id, `default`, name, email) - VALUES (%d, '1', '%s', '%s@%s')", + VALUES (%d, '1', '%s', '%s')", get_table_name('identities'), $user_id, - $user, - $user, - $host)); + $user_name, + $user_email)); // get existing mailboxes $a_mailboxes = $IMAP->list_mailboxes(); |
