summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f71c31)
raw | patch | inline | side by side (parent: 4f71c31)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 08:06:35 +0000 (08:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 08:06:35 +0000 (08:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3574 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/mail/class_mailAccount.inc | patch | blob | history |
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index 9982147537f88c2f655eadf3d0f09eabcccdf98b..4adef1da1ec6ad60da8d69bd56266877358e4385 100644 (file)
plugin::plugin($config, $dn);
if(isset($this->attrs['uid'])){
- $this->uid = $this->attrs['uid'];
+ $this->uid = $this->attrs['uid'][0];
}
+ if(is_array($this->gosaMailServer) && isset($this->gosaMailServer[0])){
+ $this->gosaMailServer = $this->gosaMailServer[0];
+ }
+
+ /* Save initial account state */
+ $this->initially_was_account= $this->is_account;
+
/* Set mailMethod to the one defined in gosa.conf */
if (isset($this->config->current['MAILMETHOD'])){
$method= $this->config->current['MAILMETHOD'];
}
- /* Create the account prefix user. user/ */
-
- /* Preset folder prefix. Will change it later to respect
+ /* Create the account prefix user. user/
+ Preset folder prefix. Will change it later to respect
altnamespace. */
if (isset($this->config->current['CYRUSUNIXSTYLE']) && $this->config->current['CYRUSUNIXSTYLE'] == "true"){
$this->folder_prefix= "user/";
/* This is not a new account, parse additional attributes */
-
- #FIXME i think is_account would be enough
if (($dn != NULL) && ($dn != "new") && $this->is_account){
/* Load attributes containing arrays */
}
}
- if(is_array($this->gosaMailServer) && isset($this->gosaMailServer[0])){
- $this->gosaMailServer = $this->gosaMailServer[0];
- }
-
- /* Save initial account state */
- $this->initially_was_account= $this->is_account;
-
-
- /* If there is a server defined, connect and get some more infos */
/* Only do IMAP actions if gosaMailServer attribute is set */
if (isset ($this->attrs["gosaMailServer"][0])){
if ($method->connect($this->gosaMailServer)){
$method->updateMailbox($this->folder_prefix.$this->$id);
+
$method->setQuota($this->folder_prefix.$this->$id, $this->gosaMailQuota);
$method->disconnect();
}
+
/* Check formular input */
function check()
{
if(!$this->is_account) return(array());
+
$ldap= $this->config->get_ldap_link();
/* Call common method to give check the hook */
return ($message);
}
+
/* Adapt from template, using 'dn' */
function adapt_from_template($dn)
{
$this->mail= strtolower(rewrite($this->mail));
}
+
/* Add entry to forwarder list */
function addForwarder($address)
{
$this->gosaMailForwardingAddress[]= $address;
$this->gosaMailForwardingAddress= array_unique ($this->gosaMailForwardingAddress);
-
sort ($this->gosaMailForwardingAddress);
reset ($this->gosaMailForwardingAddress);
$this->is_modified= TRUE;
}
+
/* Remove list of addresses from forwarder list */
function delForwarder($addresses)
{
}
-
+ /* Add given mail address to the list of alternate adresses ,
+ check if this mal address is used, skip adding in this case */
function addAlternate($address)
{
$ldap= $this->config->get_ldap_link();
-
$address= strtolower($address);
-
+
/* Is this address already assigned in LDAP? */
$ldap->cd ($this->config->current['BASE']);
$ldap->search ("(&(objectClass=gosaMailAccount)(|(mail=$address)"."(gosaMailAlternateAddress=$address)))", array("uid"));
sort ($this->gosaMailAlternateAddress);
reset ($this->gosaMailAlternateAddress);
-
return ("");
}