text("passwd", false); if (!$form->populate(input())) return; $user = user::getCurrent(); if (!$user->validatePasswd($form->passwd)) { logError(WARNING, "Account not deleted, password was incorrect"); return; } if ($user->admin == 1 && count(user::getAllAdmin_ordByUname()) == 1) { logError(ERROR, "Account not deleted, can not remove the last administrator"); return; } $user->delObj(); location("/"); } ?>