thomascube
2005-10-03 6dc0269fcc9f11fbd53da1fb647237ab73cf394d
program/include/main.inc
@@ -132,8 +132,12 @@
function rcmail_imap_init($connect=FALSE)
  {
  global $CONFIG, $IMAP;
  $IMAP = new rcube_imap();
  // enable caching of imap data
  if ($CONFIG['enable_caching']===TRUE)
    $IMAP->set_caching(TRUE);
  // set root dir from config
  if (strlen($CONFIG['imap_root']))
@@ -303,15 +307,17 @@
  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();