function session_limit_settings_byrole_submit in Session Limit 6.2
Same name and namespace in other branches
- 6 session_limit.module \session_limit_settings_byrole_submit()
- 7.2 session_limit.module \session_limit_settings_byrole_submit()
Session limit role configuration form validation.
File
- ./
session_limit.module, line 211 - Limits multiple sessions per user.
Code
function session_limit_settings_byrole_submit($form, &$form_state) {
db_query("DELETE FROM {variable} WHERE name LIKE 'session_limit_rid_%'");
foreach ($form_state['values'] as $setting_name => $setting_limit) {
variable_set($setting_name, $setting_limit);
}
drupal_set_message(t('Role settings updated.'), 'status');
watchdog('session_limit', 'Role limits updated.', array(), WATCHDOG_INFO);
}