function admin_duplicate_year_form_validate

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

Before we duplicate the year, make sure the password is correct.

File

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

Code

function admin_duplicate_year_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;

  }

}