diff options
author | thomascube <thomas@roundcube.net> | 2005-10-03 20:17:04 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2005-10-03 20:17:04 +0000 |
commit | 52c1f289c288253148bbdb742ff72104c5950dd0 (patch) | |
tree | c17454bf371b9c7e911e0224013f8614143304f8 /program/include/main.inc | |
parent | d3d42bde2a5d5e2c7915ee30b79dfde132feaed7 (diff) |
Minor bugfixes and SMTP support
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index ebf2f2685..7b34bf632 100644 --- a/program/include/main.inc +++ b/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(); |