function session_limit_user_settings in Session Limit 6.2
Same name and namespace in other branches
- 6 session_limit.module \session_limit_user_settings()
- 7.2 session_limit.module \session_limit_user_settings()
User settings form.
1 string reference to 'session_limit_user_settings'
- session_limit_menu in ./
session_limit.module - Implementation of hook_menu().
File
- ./
session_limit.module, line 341 - Limits multiple sessions per user.
Code
function session_limit_user_settings($args, $account) {
$form['account'] = array(
'#type' => 'value',
'#value' => $account,
);
$form['session_limit'] = array(
'#type' => 'select',
'#title' => t('Maximum sessions'),
'#description' => t('Total number simultaneous active sessions this user may have at one time. The default defers to the limits that apply to each of the user\'s roles.'),
'#required' => FALSE,
'#default_value' => empty($account->session_limit) ? 0 : $account->session_limit,
'#options' => _session_limit_user_options(),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}