function login_security_submit in Login Security 7
Same name and namespace in other branches
- 8 login_security.module \login_security_submit()
- 2.x login_security.module \login_security_submit()
Implements hook_sumbit().
1 string reference to 'login_security_submit'
- login_security_form_alter in ./
login_security.module - Implements hook_form_alter().
File
- ./
login_security.module, line 289 - Login Security
Code
function login_security_submit($form, &$form_state) {
// The submit handler shouldn't be called unless the authentication succeeded.
if (user_is_logged_in()) {
$login = _login_security_login_timestamp();
if (variable_get('login_security_last_login_timestamp', 0) && $login > 0) {
drupal_set_message(t('Your last login was @stamp.', array(
'@stamp' => format_date($login, 'large'),
)), 'status');
}
$access = _login_security_access_timestamp();
if (variable_get('login_security_last_access_timestamp', 0) && $access > 0) {
drupal_set_message(t('Your last page access (site activity) was @stamp.', array(
'@stamp' => format_date($access, 'large'),
)), 'status');
}
}
}