From 006bab00930248bd33f4ea6dddbf01ddddedaf26 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 14 Feb 2008 13:18:38 +0000 Subject: [PATCH] Updated mail methods. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8912 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/mail/kolab/class_mail-methods-golab.inc | 10 ++++++++-- .../personal/mail/kolab/class_mail-methods-kolab.inc | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc index 568dbcb69..642337346 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-golab.inc @@ -34,9 +34,15 @@ class mailMethodGolab extends mailMethodCyrus /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB'])){ - $this->uattrib = $config->current['MAIL_ATTRIB']; + if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ + $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if(in_array($new_uattrib,array("mail","uid"))){ + $this->uattrib = $new_uattrib; + }else{ + trigger_error(sprintf("Unsupported MAIL_ATTRIB in gosa configuration specified, use 'mail' or 'uid', instead of '%s'.", $new_uattrib)); + } } + $this->config= $config->data['SERVERS']['IMAP']; } diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc index 6158dafd7..e5054e96c 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc @@ -34,9 +34,15 @@ class mailMethodKolab extends mailMethodCyrus /* Check if the mail account identification attribute is overridden in the configuration file */ - if(isset($config->current['MAIL_ATTRIB'])){ - $this->uattrib = $config->current['MAIL_ATTRIB']; + if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){ + $new_uattrib= strtolower($config->current['MAIL_ATTRIB']); + if(in_array($new_uattrib,array("mail","uid"))){ + $this->uattrib = $new_uattrib; + }else{ + trigger_error(sprintf("Unsupported MAIL_ATTRIB in gosa configuration specified, use 'mail' or 'uid', instead of '%s'.", $new_uattrib)); + } } + $this->config= $config->data['SERVERS']['IMAP']; } -- 2.30.2