You are here

function session_limit_settings_byrole_submit in Session Limit 6

Same name and namespace in other branches
  1. 6.2 session_limit.module \session_limit_settings_byrole_submit()
  2. 7.2 session_limit.module \session_limit_settings_byrole_submit()

File

./session_limit.module, line 149
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);
}