From 568444cb6dcb7f4a2131c31c5db164c424d64dcb Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 19 Jun 2007 12:37:20 +0000 Subject: [PATCH] Udpated checks git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6627 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/scalix/class_scalixAccount.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/personal/scalix/class_scalixAccount.inc b/plugins/personal/scalix/class_scalixAccount.inc index 7f41d7e7d..b57cb93fa 100644 --- a/plugins/personal/scalix/class_scalixAccount.inc +++ b/plugins/personal/scalix/class_scalixAccount.inc @@ -39,6 +39,7 @@ class scalixAccount extends plugin var $scalixHideUserEntry= FALSE; var $scalixMailboxClass= ""; + var $uid =""; var $default_permissions= "none"; var $member_permissions= "post"; var $members= array(); @@ -68,7 +69,10 @@ class scalixAccount extends plugin /* Load attributes */ if ($dn != "new"){ - $this->uid = $this->attrs['uid']; + /* Set user id */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } foreach ($this->fakeBooleanAttributes as $val){ if (isset($this->attrs["$val"][0])&&$this->attrs["$val"][0]=="TRUE"){ @@ -348,8 +352,9 @@ class scalixAccount extends plugin $ldap->cd($this->config->current['BASE']); foreach($this->scalixEmailAddress as $k => $mail) { - $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=scalixUserClass)(|(scalixEmailAddress=". - $mail."))(!(uid=".$this->uid."))(!(cn=".$this->uid.")))", array("uid")); + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=scalixUserClass)(scalixEmailAddress=". + $mail.")(!(uid=".$this->uid."))(!(cn=".$this->uid.")))", array("uid")); + if ($ldap->count() != 0){ $message[]= _("The email address '$mail' you've entered is already in use."); } -- 2.30.2