field_text("password", null, false); if (!$form->populate($input)) { $this->logFormErrors($form); return; } $user = $this->getCurrentUser(); if (!$user->validatePassword($form->password)) { $this->logError("Account not deleted - Password was incorrect"); return; } if ($user->admin && $user->getNumAdmins() == 1) { $this->logError("Account not deleted - Cannot remove the last admin account"); return; } $user->delObj(); $this->redirectTo($this->ar() . "/"); } } ?>