function login_security_soft_block_validate in Login Security 6
Same name and namespace in other branches
- 8 login_security.module \login_security_soft_block_validate()
- 7 login_security.module \login_security_soft_block_validate()
- 2.x login_security.module \login_security_soft_block_validate()
Temporarily deny validation to users with excess invalid login attempts.
@url http://drupal.org/node/493164
1 string reference to 'login_security_soft_block_validate'
- login_security_form_alter in ./
login_security.module - Implementation of hook_form_alter().
File
- ./
login_security.module, line 128 - Login Security
Code
function login_security_soft_block_validate($form, &$form_state) {
$variables = _login_security_get_variables_by_name($form_state['values']['name']);
// Check for host login attempts: Soft
if ($variables['%soft_block_attempts'] >= 1) {
if ($variables['%ip_current_count'] >= $variables['%soft_block_attempts']) {
form_set_error('submit', login_security_t(variable_get('login_security_host_soft_banned', LOGIN_SECURITY_HOST_SOFT_BANNED), $variables));
}
}
}