You are here

function session_limit_user in Session Limit 6.2

Same name and namespace in other branches
  1. 6 session_limit.module \session_limit_user()

Implementation of hook_user().

File

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

Code

function session_limit_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'view':
      if (user_access('administer session limits per user')) {
        $account->content['session_limit'] = array(
          '#title' => t('Session limit'),
          '#type' => 'user_profile_category',
          'session_limit' => array(
            '#value' => empty($account->session_limit) ? t('Default') : $account->session_limit,
          ),
        );
      }
      break;
  }
}