You are here

function user_limit_surpassed in User Limit 6

Calculates whether we surpassed the number of allowed users on the site.

This limit is based on the settings. The number is calculated with user_limit_count_users(), which makes the result vary according to settings.

Return value

TRUE if the limit is surpassed, FALSE otherwise.

2 calls to user_limit_surpassed()
user_limit_form_user_register_alter in ./user_limit.module
Implementation of hook_FORM_ID_alter().
user_limit_user in ./user_limit.module
Implementation of hook_user().

File

./user_limit.module, line 76
Everything related to User Limit. There are no include files.

Code

function user_limit_surpassed() {
  $user_limit = variable_get('user_limit', 0);
  if ($user_limit > 0 && user_limit_count_users() > $user_limit) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}