introduced a new group management feature

This commit is contained in:
SJ
2014-07-05 17:09:38 +02:00
parent d79b1f97c7
commit bdae1bab9d
11 changed files with 113 additions and 24 deletions

View File

@ -70,6 +70,10 @@ class ControllerGroupAdd extends Controller {
$this->error['email'] = $this->data['text_missing_data'];
}
if(!isset($this->request->post['assigned_email']) || $this->request->post['assigned_email'] == '') {
$this->error['assigned_email'] = $this->data['text_missing_data'];
}
if (!$this->error) {
return true;
} else {

View File

@ -59,6 +59,7 @@ class ControllerGroupEdit extends Controller {
else {
$this->data['group'] = $this->model_group_group->get_domain_by_id($this->data['id']);
$this->data['email'] = $this->model_group_group->get_emails_by_group_id($this->data['id']);
$this->data['assigned_email'] = $this->model_group_group->get_assigned_emails_by_group_id($this->data['id']);
}
}
else {
@ -83,6 +84,10 @@ class ControllerGroupEdit extends Controller {
$this->error['email'] = $this->data['text_missing_data'];
}
if(!isset($this->request->post['assigned_email']) || $this->request->post['assigned_email'] == '') {
$this->error['assigned_email'] = $this->data['text_missing_data'];
}
if(!isset($this->request->post['id']) || !is_numeric($this->request->post['id']) || (int)$this->request->post['id'] < 0) {
$this->error['id'] = $this->data['text_invalid_data'];
}

View File

@ -75,11 +75,11 @@ class ControllerUserEdit extends Controller {
$this->data['user']['domains'] = $this->model_user_user->get_domains_by_uid($this->data['uid']);
$this->data['user']['group_membership'] = $this->model_user_user->get_additional_uids($this->data['uid']);
$this->data['user']['group'] = $this->model_group_group->get_groups_by_uid($this->data['uid']);
$this->data['user']['folder'] = $this->model_folder_folder->get_folders_by_uid($this->data['uid']);
$this->data['emails'] = $this->model_user_user->get_emails($this->data['user']['username']);
$this->data['user']['group'] = $this->model_group_group->get_groups_by_email(array($this->data['emails']));
//}
}
else {

View File

@ -38,8 +38,8 @@ class ControllerUserSettings extends Controller {
$auditdomains .= ', ' . $d;
}
$auditdomains = preg_replace("/^,\s/", "", $auditdomains);
$auditgroups = preg_replace("/\s/", ", ", $this->model_group_group->get_groups_by_uid($session->get("uid")));
$auditgroups = preg_replace("/\s/", ", ", $this->model_group_group->get_groups_by_email($session->get("emails")));
$folders = $session->get("folders");