You are here

function legal_login_validate in Legal 5

Same name and namespace in other branches
  1. 6.8 legal.module \legal_login_validate()
  2. 6.7 legal.module \legal_login_validate()
  3. 7.2 legal.module \legal_login_validate()
  4. 7 legal.module \legal_login_validate()

File

./legal.module, line 581

Code

function legal_login_validate($form_id, $form_values) {
  $account = db_fetch_object(db_query('SELECT * FROM {users} WHERE uid = %d LIMIT 1', $form_values['uid']));
  $id_hash = md5($account->name . $account->password . $account->login);
  if ($id_hash != $form_values['id_hash']) {
    form_set_error('legal_accept', t('User ID cannot be identified.'));
    drupal_goto();
  }
  return;
}