From b499688318c68e3b2de8287e3fa09587c7047bbc Mon Sep 17 00:00:00 2001 From: Boris Gulay Date: Fri, 27 May 2016 23:49:09 +0300 Subject: [PATCH] Fixed #2 validation error when saving default identity (thanx Wouter de Geus). --- ident_switch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ident_switch.php b/ident_switch.php index b328390..b437d9d 100644 --- a/ident_switch.php +++ b/ident_switch.php @@ -135,7 +135,7 @@ class ident_switch extends rcube_plugin { $rc = rcmail::get_instance(); - // Do now show options for default identity + // Do not show options for default identity if (strcasecmp($args['record']['email'], $rc->user->data['username']) === 0) return $args; @@ -182,6 +182,11 @@ class ident_switch extends rcube_plugin { $rc = rcmail::get_instance(); + // Do not do anything for default identity + if (strcasecmp($args['record']['email'], $rc->user->data['username']) === 0) + return $args; + + $this->add_texts('localization'); // Check field values