diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-02-23 18:31:23 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-02-23 18:31:23 +0000 |
| commit | 3d5652cb40fee591ca18e617a1570fdb438c4de7 (patch) | |
| tree | 088938ab71a6e5b3c829fe289abd170e382deac4 /roundcubemail | |
| parent | 83f88b3c9dd0b4fac0eb27c7d24c97a7140413aa (diff) | |
- Squirrelmail_usercopy: support reply-to field (#1486506)
- Use rcube_user::insert_identity() instead of custom SQL query in rcube_user::create()
git-svn-id: https://svn.roundcube.net/trunk@3286 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php | 13 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_user.php | 13 |
3 files changed, 12 insertions, 15 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 34c3e76aa..14fc172d3 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG RoundCube Webmail =========================== +- Squirrelmail_usercopy: support reply-to field (#1486506) - Fix IE spellcheck suggestion popup issue (#1486471) - Fix email address auto-completion shows regexp pattern (#1486258) - Fix merging of configuration parameters: user prefs always survive (#1486368) diff --git a/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php b/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php index aff2f494f..634f837c6 100644 --- a/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php +++ b/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php @@ -5,7 +5,7 @@ * * Currently only file-based data storage of Squirrelmail is supported. * - * @version 1.0 + * @version 1.1 * @author Thomas Bruederli */ class squirrelmail_usercopy extends rcube_plugin @@ -33,17 +33,20 @@ class squirrelmail_usercopy extends rcube_plugin public function create_identity($p) { + $rcmail = rcmail::get_instance(); + // only execute on login - if ($p['login'] && $this->prefs) { + if ($rcmail->task == 'login' && $this->prefs) { if ($this->prefs['full_name']) $p['record']['name'] = $this->prefs['full_name']; if ($this->prefs['email_address']) $p['record']['email'] = $this->prefs['email_address']; if ($this->prefs['signature']) $p['record']['signature'] = $this->prefs['signature']; - + if ($this->prefs['reply-to']) + $p['record']['reply-to'] = $this->prefs['reply-to']; + // copy address book - $rcmail = rcmail::get_instance(); $contacts = $rcmail->get_address_book(null, true); if ($contacts && count($this->abook)) { foreach ($this->abook as $rec) @@ -93,4 +96,4 @@ class squirrelmail_usercopy extends rcube_plugin } -?>
\ No newline at end of file +?> diff --git a/roundcubemail/program/include/rcube_user.php b/roundcubemail/program/include/rcube_user.php index a5294f552..127efa746 100644 --- a/roundcubemail/program/include/rcube_user.php +++ b/roundcubemail/program/include/rcube_user.php @@ -215,6 +215,8 @@ class rcube_user if (!$this->ID) return false; + unset($data['user_id']); + $insert_cols = $insert_values = array(); foreach ((array)$data as $col => $value) { @@ -422,20 +424,11 @@ class rcube_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; } |
