Beispiel #1
0
     }
     $admin_update_query .= " WHERE `adminid` = '" . (int) $result['adminid'] . "'";
     Database::query($admin_update_query);
     $log->logAction(ADM_ACTION, LOG_INFO, "deleted user '" . $result['loginname'] . "'");
     inserttask('1');
     // Using nameserver, insert a task which rebuilds the server config
     inserttask('4');
     if (isset($_POST['delete_userfiles']) && (int) $_POST['delete_userfiles'] == 1) {
         inserttask('6', $result['loginname']);
     }
     // Using filesystem - quota, insert a task which cleans the filesystem - quota
     inserttask('10');
     /*
      * move old tickets to archive
      */
     $tickets = ticket::customerHasTickets($id);
     if ($tickets !== false && isset($tickets[0])) {
         foreach ($tickets as $ticket) {
             $now = time();
             $mainticket = ticket::getInstanceOf($userinfo, (int) $ticket);
             $mainticket->Set('lastchange', $now, true, true);
             $mainticket->Set('lastreplier', '1', true, true);
             $mainticket->Set('status', '3', true, true);
             $mainticket->Update();
             $mainticket->Archive();
             $log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
         }
     }
     redirectTo($filename, array('page' => $page, 's' => $s));
 } else {
     ask_yesno_withcheckbox('admin_customer_reallydelete', 'admin_customer_alsoremovefiles', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']);