@@ -274,11 +274,11 @@ public function delete($id = null)
274274 }
275275
276276
277- $ userGroup = new Engine \UserGroup ;
277+ $ userGroup = new Engine \UserGroup () ;
278278 $ userGroup ->delUser ($ id );
279279
280280
281- $ command = new Engine \Command ;
281+ $ command = new Engine \Command () ;
282282 $ myCommand = $ command ->getOwned ($ id );
283283 if ($ myCommand ) {
284284 foreach ($ myCommand as $ command_id => $ cmd ) {
@@ -287,7 +287,7 @@ public function delete($id = null)
287287 }
288288 }
289289
290- $ contact = new Engine \Contact ;
290+ $ contact = new Engine \Contact () ;
291291 $ myContact = $ contact ->getOwned ($ id );
292292 if ($ myContact ) {
293293 foreach ($ myContact as $ contact_id => $ cmd ) {
@@ -298,7 +298,7 @@ public function delete($id = null)
298298 }
299299
300300
301- $ contactgroup = new Engine \Contactgroup ;
301+ $ contactgroup = new Engine \Contactgroup () ;
302302 $ myContactgroup = $ contactgroup ->getOwned ($ id );
303303 if ($ myContactgroup ) {
304304 foreach ($ myContactgroup as $ contactgroup_id => $ cmd ) {
@@ -308,7 +308,7 @@ public function delete($id = null)
308308 }
309309
310310
311- $ hostgroup = new Engine \Hostgroup ;
311+ $ hostgroup = new Engine \Hostgroup () ;
312312 $ myHostgroup = $ hostgroup ->getOwned ($ id );
313313 if ($ myHostgroup ) {
314314 foreach ($ myHostgroup as $ hostgroup_id => $ cmd ) {
@@ -317,7 +317,7 @@ public function delete($id = null)
317317 }
318318 }
319319
320- $ host = new Engine \Host ;
320+ $ host = new Engine \Host () ;
321321 $ myHost = $ host ->getOwned ($ id );
322322 if ($ myHost ) {
323323 foreach ($ myHost as $ host_id => $ cmd ) {
@@ -326,7 +326,7 @@ public function delete($id = null)
326326 }
327327 }
328328
329- $ servicegroup = new Engine \Servicegroup ;
329+ $ servicegroup = new Engine \Servicegroup () ;
330330 $ myServicegroup = $ servicegroup ->getOwned ($ id );
331331 if ($ myServicegroup ) {
332332 foreach ($ myServicegroup as $ servicegroup_id => $ cmd ) {
@@ -335,7 +335,7 @@ public function delete($id = null)
335335 }
336336 }
337337
338- $ service = new Engine \Service ;
338+ $ service = new Engine \Service () ;
339339 $ myService = $ service ->getOwned ($ id );
340340 if ($ myService ) {
341341 foreach ($ myService as $ service_id => $ cmd ) {
@@ -344,7 +344,7 @@ public function delete($id = null)
344344 }
345345 }
346346
347- $ timeperiod = new Engine \Timeperiod ;
347+ $ timeperiod = new Engine \Timeperiod () ;
348348 $ myTimeperiod = $ timeperiod ->getOwned ($ id );
349349 if ($ myTimeperiod ) {
350350 foreach ($ myTimeperiod as $ timeperiod_id => $ cmd ) {
@@ -365,14 +365,12 @@ public function delete($id = null)
365365 }
366366 }
367367
368- if ($ this ->deleteFromSQL ()) {
368+ if ($ this ->deleteFromSQL ($ this -> getUserID () )) {
369369
370370 $ this ->addStatusMessage (sprintf (_ ('Uživatel %s byl smazán ' ),
371371 $ this ->getUserLogin ()));
372372
373- require_once 'Ease/EaseMail.php ' ;
374-
375- $ email = new EaseMail ($ this ->getDataValue ('email ' ),
373+ $ email = new \Ease \Mailer ($ this ->getDataValue ('email ' ),
376374 _ ('Oznámení o zrušení účtu ' ));
377375 $ email ->setMailHeaders (['From ' => EMAIL_FROM ]);
378376 $ email ->addItem (new \Ease \Html \Div ("Právě jste byl/a smazán/a z Aplikace VSMonitoring s těmito přihlašovacími údaji: \n" ));
0 commit comments