function autologout_user_profile_submit in Automated Logout 6.4
Same name and namespace in other branches
- 8 autologout.module \autologout_user_profile_submit()
- 7.4 autologout.module \autologout_user_profile_submit()
Handle submission of timeout threshold in user/edit.
1 string reference to 'autologout_user_profile_submit'
- autologout_form_user_profile_form_alter in ./
autologout.module - Adds a field to user/edit to change that users logout.
File
- ./
autologout.module, line 315 - Used to automagically log out a user after a preset time.
Code
function autologout_user_profile_submit(&$form, &$form_state) {
global $user;
$current_uid = $user->uid;
$userid = $form['#uid'];
$access = FALSE;
if (user_access('change own logout threshold') && $current_uid == $userid || user_access('auto administer autologout')) {
$access = TRUE;
}
if ($access) {
$val = $form_state['values']['autologout_user_' . $userid];
variable_set('autologout_user_' . $userid, $val);
}
}