function session_limit_user_max_sessions_byrole in Session Limit 6
Same name and namespace in other branches
- 6.2 session_limit.module \session_limit_user_max_sessions_byrole()
- 7.2 session_limit.module \session_limit_user_max_sessions_byrole()
2 calls to session_limit_user_max_sessions_byrole()
- session_limit_token_values in ./
session_limit.module - Implementation of hook_token_values().
- session_limit_user_max_sessions in ./
session_limit.module
File
- ./
session_limit.module, line 411 - Limits multiple sessions per user.
Code
function session_limit_user_max_sessions_byrole($account) {
$limits = array();
foreach ($account->roles as $rid => $name) {
$limits[] = variable_get("session_limit_rid_{$rid}", 0);
}
rsort($limits);
return check_plain($limits[0]);
}