summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7bc9ad2)
raw | patch | inline | side by side (parent: 7bc9ad2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Nov 2010 11:57:17 +0000 (11:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Nov 2010 11:57:17 +0000 (11:57 +0000) |
-Cleaned code
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20168 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20168 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_Groupware.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc
index aa884fbe3a910f28b058f6cef6b15d2ebfdd5afa..e92c35cbe016739fc6292e1034a671e009b2ce35 100644 (file)
class Groupware extends plugin
{
- // Folder related attributes, will be moved into a speperate widget late on
- var $currentSelectedFolder = "";
-
var $plHeadline = "Groupware";
var $plDescription = "GOsa groupware extension.";
var $pathTitle = "GOsa groupware extension.";
$smarty->assign($feature."_isActive", $state);
}
- $smarty->assign("currentSelectedFolder", $this->currentSelectedFolder);
- $folderEntries = array();
- if(isset($this->mailFolder[$this->currentSelectedFolder])) {
- $folderEntries = $this->mailFolder[$this->currentSelectedFolder];
- }
- $smarty->assign("folderEntries", $folderEntries);
-
$smarty->assign("mailLocations", $this->mailLocations);
if (count($this->vacationTemplates)){
$smarty->assign("displayTemplateSelector", "true");
*/
function remove_from_parent()
{
- // Get rpc handle to remove the account
- if($this->initially_was_account){
- if($this->rpcExec('gwAcctDel', $this->uid) === NULL){
- msg_dialog::display(_("Error"), _("Groupware account removal failed!"), ERROR_DIALOG);
- }
- }
+# // Get rpc handle to remove the account
+# if($this->initially_was_account){
+# if($this->rpcExec('gwAcctDel', $this->uid) === NULL){
+# msg_dialog::display(_("Error"), _("Groupware account removal failed!"), ERROR_DIALOG);
+# }
+# }
}
//checke features only if they are enabled.
$messages = plugin::check();
- //checks for feature "primaryMail"
- if ($this->isFeatureEnabled("mailBoxWarnLimit")){
+ // For newly created users!
+ // We can input every 'uid' we want for new users, so we've to check if uids weren't used yet.
+ if(!$this->initially_was_account){
+ $exists = $this->rpcExec('gwAcctExists', $this->uid);
+ if($this->rpcError){
+ $messages[] = sprintf(_("Failed to validate groupware account."), $this->uid);
+ }elseif($exists){
+ $messages[] = sprintf(_("Account id, already used '%s'!"), $this->uid);
+ }
+ }
+
+ // Check for valid mailAddresses
+ if ($this->isFeatureEnabled("primaryMail")){
+
if(!tests::is_email ($this->mailAddress)){
$messages[] = msgPool::invalid(_("Mail address"),$this->mailAddress , "", "user@exdom.intranet.gonicus.de knibbel");
}
// Ensure that the mailAddress isn't used yet.
- if(!count($messages) && (
- !$this->initially_was_account ||
- $this->mailAddress != $this->saved_attributes['primaryMail'])){
+ if(!$this->initially_was_account || $this->mailAddress != $this->saved_attributes['primaryMail']){
$exists = $this->rpcExec("gwMailAddressExists", $this->mailAddress);
if($this->rpcError){
$messages[] = sprintf(_("Failed to validate mail address '%s'."), $this->mailAddress);
}
}
-# //checks for feature "quotaUsage"
-# if ($this->isFeatureEnabled("quotaUsage")){}
-#
-# //checks for feature "mailLocations"
-# if ($this->isFeatureEnabled("mailLocations")){}
-#
-# //checks for feature "mailFilter"
-# if ($this->isFeatureEnabled("mailFilter")){}
-#
-# //checks for feature "alternateAddresses"
-# if ($this->isFeatureEnabled("alternateAddresses")){}
-
//checks for feature "forwardingAddresses"
if ($this->isFeatureEnabled("forwardingAddresses")){
if(isset($this->forwardingAddresses) && is_array($this->forwardingAddresses)){
}
}
- //checks for feature "vacationMessage"
- if ($this->isFeatureEnabled("vacationMessage")){}
//checks for feature "mailLimit" - integer
if ($this->isFeatureEnabled("mailLimit")){
if (!is_numeric($this->mailLimitReceiveValue)){
}
}
+# //checks for feature "vacationMessage"
+# if ($this->isFeatureEnabled("vacationMessage")){}
+#
# //checks for feature "mailBoxAutomaticRemoval"
# if ($this->isFeatureEnabled("mailBoxAutomaticRemoval")){}
#
#
# //checks for feature "mailFolder"
# if ($this->isFeatureEnabled("mailFolder")){}
+#
+# //checks for feature "quotaUsage"
+# if ($this->isFeatureEnabled("quotaUsage")){}
+#
+# //checks for feature "mailLocations"
+# if ($this->isFeatureEnabled("mailLocations")){}
+#
+# //checks for feature "mailFilter"
+# if ($this->isFeatureEnabled("mailFilter")){}
+#
+# //checks for feature "alternateAddresses"
+# if ($this->isFeatureEnabled("alternateAddresses")){}
+
return($messages);
}