From 333c48caf7b7e166d744a747c90ad2837c17c082 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 23 Feb 2010 18:31:23 +0000 Subject: - Squirrelmail_usercopy: support reply-to field (#1486506) - Use rcube_user::insert_identity() instead of custom SQL query in rcube_user::create() --- plugins/squirrelmail_usercopy/squirrelmail_usercopy.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'plugins/squirrelmail_usercopy') diff --git a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php index aff2f494f..634f837c6 100644 --- a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php +++ b/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 +?> -- cgit v1.2.3