You are here

function session_limit_user_max_sessions_byuser in Session Limit 6.2

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

Get user specified session limit.

Parameters

user $account: The user account to get the session limit for

Return value

int Maximum number of sessions A value of 0 means that no user limit is set for the current user and so the role limit should be used (or default if no role limit either).

1 call to session_limit_user_max_sessions_byuser()
session_limit_user_max_sessions in ./session_limit.module
Get the maximum number of sessions for a user.

File

./session_limit.module, line 507
Limits multiple sessions per user.

Code

function session_limit_user_max_sessions_byuser($account) {
  return (int) empty($account->session_limit) ? 0 : $account->session_limit;
}