function session_limit_settings_byrole_submit in Session Limit 7.2
Same name and namespace in other branches
- 6.2 session_limit.module \session_limit_settings_byrole_submit()
- 6 session_limit.module \session_limit_settings_byrole_submit()
Set session limits by role form submission.
File
- ./
session_limit.module, line 243 - Limits multiple sessions per user.
Code
function session_limit_settings_byrole_submit($form, &$form_state) {
db_delete('variable')
->condition('name', 'session_limit_rid_%', 'LIKE')
->execute();
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);
}