function user_limit_reached in User Limit 6
Same name and namespace in other branches
- 7 user_limit.module \user_limit_reached()
Calculates whether we reached 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 reached, FALSE otherwise.
1 call to user_limit_reached()
- user_limit_form_user_register_alter in ./
user_limit.module - Implementation of hook_FORM_ID_alter().
File
- ./
user_limit.module, line 56 - Everything related to User Limit. There are no include files.
Code
function user_limit_reached() {
$user_limit = variable_get('user_limit', 0);
if ($user_limit > 0 && user_limit_count_users() == $user_limit) {
return TRUE;
}
else {
return FALSE;
}
}