| | |
| | | if ($this->prefs['___sig'.$i.'___']) |
| | | $ident_data['signature'] = $this->prefs['___sig'.$i.'___']; |
| | | // insert identity |
| | | $identid = $rcmail->user->insert_identity($ident_data); |
| | | $rcmail->user->insert_identity($ident_data); |
| | | } |
| | | } |
| | | |
| | |
| | | foreach ($this->abook as $rec) { |
| | | // #1487096 handle multi-address and/or too long items |
| | | $rec['email'] = array_shift(explode(';', $rec['email'])); |
| | | if (check_email(rcube_idn_to_ascii($rec['email']))) { |
| | | $rec['email'] = rcube_idn_to_utf8($rec['email']); |
| | | if (rcube_utils::check_email(rcube_utils::idn_to_ascii($rec['email']))) { |
| | | $rec['email'] = rcube_utils::idn_to_utf8($rec['email']); |
| | | $contacts->insert($rec, true); |
| | | } |
| | | } |
| | |
| | | if ($db_charset) |
| | | $db->query('SET NAMES '.$db_charset); |
| | | |
| | | $sql_result = $db->query('SELECT * FROM '.$userprefs_table.' WHERE user=?', $uname); // ? is replaced with emailaddress |
| | | $sql_result = $db->query('SELECT * FROM ' . $db->quote_identifier($userprefs_table) |
| | | .' WHERE `user` = ?', $uname); // ? is replaced with emailaddress |
| | | |
| | | while ($sql_array = $db->fetch_assoc($sql_result) ) { // fetch one row from result |
| | | $this->prefs[$sql_array['prefkey']] = rcube_charset_convert(rtrim($sql_array['prefval']), $db_charset); |
| | | $this->prefs[$sql_array['prefkey']] = rcube_charset::convert(rtrim($sql_array['prefval']), $db_charset); |
| | | } |
| | | |
| | | /* retrieve address table data */ |
| | | $sql_result = $db->query('SELECT * FROM '.$address_table.' WHERE owner=?', $uname); // ? is replaced with emailaddress |
| | | $sql_result = $db->query('SELECT * FROM ' . $db->quote_identifier($address_table) |
| | | .' WHERE `owner` = ?', $uname); // ? is replaced with emailaddress |
| | | |
| | | // parse addres book |
| | | while ($sql_array = $db->fetch_assoc($sql_result) ) { // fetch one row from result |
| | | $rec['name'] = rcube_charset_convert(rtrim($sql_array['nickname']), $db_charset); |
| | | $rec['firstname'] = rcube_charset_convert(rtrim($sql_array['firstname']), $db_charset); |
| | | $rec['surname'] = rcube_charset_convert(rtrim($sql_array['lastname']), $db_charset); |
| | | $rec['email'] = rcube_charset_convert(rtrim($sql_array['email']), $db_charset); |
| | | $rec['notes'] = rcube_charset_convert(rtrim($sql_array['label']), $db_charset); |
| | | $rec['name'] = rcube_charset::convert(rtrim($sql_array['nickname']), $db_charset); |
| | | $rec['firstname'] = rcube_charset::convert(rtrim($sql_array['firstname']), $db_charset); |
| | | $rec['surname'] = rcube_charset::convert(rtrim($sql_array['lastname']), $db_charset); |
| | | $rec['email'] = rcube_charset::convert(rtrim($sql_array['email']), $db_charset); |
| | | $rec['notes'] = rcube_charset::convert(rtrim($sql_array['label']), $db_charset); |
| | | |
| | | if ($rec['name'] && $rec['email']) |
| | | $this->abook[] = $rec; |
| | | } |
| | | } // end if 'sql'-driver |
| | | } |
| | | |
| | | } |