| | |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id: rcube_user.inc 933 2007-11-29 14:17:32Z thomasb $ |
| | | $Id$ |
| | | |
| | | */ |
| | | |
| | |
| | | |
| | | $this->language = $_SESSION['language']; |
| | | if ($this->db->affected_rows()) { |
| | | $config->merge($a_user_prefs); |
| | | $config->set_user_prefs($a_user_prefs); |
| | | return true; |
| | | } |
| | | |
| | |
| | | if (!$this->ID) |
| | | return false; |
| | | |
| | | unset($data['user_id']); |
| | | |
| | | $insert_cols = $insert_values = array(); |
| | | foreach ((array)$data as $col => $value) |
| | | { |
| | |
| | | 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 " . |
| | |
| | | $rcmail = rcmail::get_instance(); |
| | | |
| | | // try to resolve user in virtuser table and file |
| | | if (!strpos($user, '@')) { |
| | | if ($email_list = self::user2email($user, false, true)) |
| | | $user_email = is_array($email_list[0]) ? $email_list[0][0] : $email_list[0]; |
| | | if ($email_list = self::user2email($user, false, true)) { |
| | | $user_email = is_array($email_list[0]) ? $email_list[0][0] : $email_list[0]; |
| | | } |
| | | |
| | | $data = $rcmail->plugins->exec_hook('create_user', |
| | |
| | | '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; |
| | | } |