alecpl
2010-02-23 333c48caf7b7e166d744a747c90ad2837c17c082
program/include/rcube_user.php
@@ -16,7 +16,7 @@
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
 $Id: rcube_user.inc 933 2007-11-29 14:17:32Z thomasb $
 $Id$
*/
@@ -123,7 +123,7 @@
    $this->language = $_SESSION['language'];
    if ($this->db->affected_rows()) {
      $config->merge($a_user_prefs);
      $config->set_user_prefs($a_user_prefs);
      return true;
    }
@@ -215,6 +215,8 @@
    if (!$this->ID)
      return false;
    unset($data['user_id']);
    $insert_cols = $insert_values = array();
    foreach ((array)$data as $col => $value)
    {
@@ -244,9 +246,6 @@
  function delete_identity($iid)
  {
    if (!$this->ID)
      return false;
    if (!$this->ID || $this->ID == '')
      return false;
    $sql_result = $this->db->query("SELECT count(*) AS ident_count FROM " .
@@ -425,20 +424,11 @@
            'name' => strip_newlines($name),
            'email' => $email,
            'standard' => $standard,
            'signature' => '',
          ),
        ));
          
        if (!$plugin['abort'] && $plugin['record']['email']) {
          $dbh->query(
              "INSERT INTO ".get_table_name('identities')."
                (user_id, del, standard, name, email, signature)
               VALUES (?, 0, ?, ?, ?, ?)",
              $user_id,
              $plugin['record']['standard'],
              $plugin['record']['name'] != NULL ? $plugin['record']['name'] : '',
              $plugin['record']['email'],
              $plugin['record']['signature']);
          $rcmail->user->insert_identity($plugin['record']);
        }
        $standard = 0;
      }