function admin_apply_draft_changes_form_validate

6.x admin.module admin_apply_draft_changes_form_validate($form, &$form_state)

Before we apply changes, make sure the password is correct.

File

modules/admin/admin.module, line 1089
The administrative configurations for FlightPath.

Code

function admin_apply_draft_changes_form_validate($form, &$form_state) {

  $values = $form_state ["values"];

  // Check to make sure they entered the transfer passcode correctly.
  if ($values ["passcode"] != variable_get("admin_transfer_passcode", sha1(mt_rand()))) {

    form_error("passcode", t("Sorry, but the password you entered is not correct.  Check with the FlightPath administrator
                              (or check the admin settings pages) to learn the password."));
    return;

  }

}