function session_limit_action_info_alter in Session Limit 6.2
Same name and namespace in other branches
- 6 session_limit.module \session_limit_action_info_alter()
- 7.2 session_limit.module \session_limit_action_info_alter()
Implementation of hook_action_info_alter().
File
- ./
session_limit.module, line 274 - Limits multiple sessions per user.
Code
function session_limit_action_info_alter(&$info) {
if (module_exists('token_actions')) {
foreach ($info as $type => $data) {
if (stripos($type, "token_actions_") === 0 || stripos($type, "system_") === 0) {
if (isset($info[$type]['hooks']['session_limit'])) {
array_merge($info[$type]['hooks']['session_limit'], array(
'collision',
'disconnect',
));
}
else {
$info[$type]['hooks']['session_limit'] = array(
'collision',
'disconnect',
);
}
}
}
}
}