| Versionen | |
|---|---|
| drupal6 – drupal7 | user_login_final_validate($form, &$form_state) |
A validate handler on the login form. Should be the last validator. Sets an error if user has not been authenticated yet.
modules/
<?php
function user_login_final_validate($form, &$form_state) {
global $user;
if (!$user->uid) {
form_set_error('name', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password'))));
}
}
?>
Kommentare
Kommentar hinzufügen