function session_limit_settings_validate in Session Limit 6.2
Same name and namespace in other branches
- 6 session_limit.module \session_limit_settings_validate()
- 7.2 session_limit.module \session_limit_settings_validate()
Session limit settings form validation.
File
- ./
session_limit.module, line 175 - Limits multiple sessions per user.
Code
function session_limit_settings_validate($form, &$form_state) {
$maxsessions = $form_state['values']['session_limit_max'];
if (!is_numeric($maxsessions)) {
form_set_error('session_limit_max', t('You must enter a number for the maximum number of active sessions'));
}
elseif ($maxsessions < 0) {
form_set_error('session_limit_max', t('Maximum number of active sessions must be positive'));
}
}