You are here

function logintoboggan_user_login_validate in LoginToboggan 5

Same name and namespace in other branches
  1. 8 logintoboggan.module \logintoboggan_user_login_validate()
  2. 6 logintoboggan.module \logintoboggan_user_login_validate()
  3. 7 logintoboggan.module \logintoboggan_user_login_validate()

Custom validation for user login form

File

./logintoboggan.module, line 400
Logintoboggan Module

Code

function logintoboggan_user_login_validate($form_id, $form_values, $form) {
  if (isset($form_values['name'])) {
    if ($name = db_result(db_query("SELECT name FROM {users} WHERE LOWER(mail) = LOWER('%s')", $form_values['name']))) {
      form_set_value($form['name'], $name);
    }
  }
}