plugins/kolab_auth
Aleksander Machniak
machniak at kolabsys.com
Wed Sep 11 14:08:56 CEST 2013
plugins/kolab_auth/kolab_auth.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 8002f2b0ca319f6c903e2ca483bff796a36a39d1
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Wed Sep 11 14:07:50 2013 +0200
Take identities_level setting into consideration when identity form is going to be modified
diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php
index 7c61553..13d4e86 100644
--- a/plugins/kolab_auth/kolab_auth.php
+++ b/plugins/kolab_auth/kolab_auth.php
@@ -475,13 +475,20 @@ class kolab_auth extends rcube_plugin
*/
public function identity_form($args)
{
+ $rcmail = rcube::get_instance();
+ $ident_level = intval($rcmail->config->get('identities_level', 0));
+
+ // do nothing if email address modification is disabled
+ if ($ident_level == 1 || $ident_level == 3) {
+ return $args;
+ }
+
$ldap = self::ldap();
if (!$ldap || !$ldap->ready || empty($_SESSION['kolab_dn'])) {
return $args;
}
- $emails = array();
- $rcmail = rcube::get_instance();
+ $emails = array();
$user_record = $ldap->get_record($_SESSION['kolab_dn']);
foreach ((array)$rcmail->config->get('kolab_auth_email', array()) as $col) {
More information about the commits
mailing list