diff --git a/lam/templates/profedit/profiledelete.php b/lam/templates/profedit/profiledelete.php
index f6aff7fd..0d2832d5 100644
--- a/lam/templates/profedit/profiledelete.php
+++ b/lam/templates/profedit/profiledelete.php
@@ -51,30 +51,29 @@ if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
exit;
}
-// print standard header
-include '../main_header.php';
-echo ("
\n");
-
// check if admin has submited delete operation
if ($_POST['submit']) {
// delete profile
if (!delAccountProfile($_POST['del'], $_POST['type'])) {
- StatusMessage("ERROR", _("Unable to delete profile!"), $_POST['del'] . "." . $_POST['type']);
+ metaRefresh('profilemain.php?deleteScope=' . $_POST['type'] . '&deleteFailed=' . $_POST['del']);
+ exit();
+ }
+ else {
+ metaRefresh('profilemain.php?deleteScope=' . $_POST['type'] . '&deleteSucceeded=' . $_POST['del']);
+ exit();
}
- else StatusMessage("INFO", _("Deleted profile:"), $_POST['del'] . "." . $_POST['type']);
- echo ("
" . _("Back to profile editor") . "");
- echo ("