/** * * @return void */ public function toggleActive() { if ($this->input->is_ajax_request() && ($mailbox = $this->input->post("username")) !== NULL) { // Check has the user the minimum ADMIN right for this domain or is it a super admin if ($this->auth->has_right(Auth::ADMIN, $mailbox)) { $this->output->set_json_output($this->mailboxes_model->update($mailbox, ["active" => "NOT active"], FALSE)); return; } json_access_denied(); } redirect($this->router->default_controller); }
/** * */ public function delete() { if ($this->input->is_ajax_request()) { // Only superadmins can delete domains if ($this->auth->is_superadmin()) { json_warning(FALSE, lang("domains_delete_failed")); } json_access_denied(); } redirect($this->router->default_controller); }