| | |
| | | | program/include/rcube_user.inc | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland | |
| | | | Copyright (C) 2005-2010, The Roundcube Dev Team | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | |
| | | $this->language = $_SESSION['language']; |
| | | |
| | | if ($this->db->affected_rows()) { |
| | | if ($this->db->affected_rows() !== false) { |
| | | $config->set_user_prefs($a_user_prefs); |
| | | $this->data['preferences'] = $save_prefs; |
| | | return true; |
| | |
| | | |
| | | // we'll not delete last identity |
| | | if ($sql_arr['ident_count'] <= 1) |
| | | return false; |
| | | return -1; |
| | | |
| | | $this->db->query( |
| | | "UPDATE ".get_table_name('identities'). |
| | |
| | | { |
| | | $dbh = rcmail::get_instance()->get_dbh(); |
| | | |
| | | // use BINARY (case-sensitive) comparison on MySQL, other engines are case-sensitive |
| | | $mod = preg_match('/^mysql/', $dbh->db_provider) ? 'BINARY' : ''; |
| | | |
| | | // query for matching user name |
| | | $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = ?"; |
| | | $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = $mod ?"; |
| | | $sql_result = $dbh->query(sprintf($query, 'username'), $host, $user); |
| | | |
| | | // query for matching alias |