You are here

function hook_invite_limit in Invite 7.2

Alter the limit of invitations a user is allowed to send.

This hook is invoked when the invitation limit is being determined for a specific user. Modules implementing this hook should return the number of invitations they wish the user to be limited to. If multiple modules return values, the last invoked module will take precedence. The hook should retrun INVITE_UNLIMITED if it wishes to remove the limitation.

Parameters

$account: The account for which the limit is being determined.

$limit: The currently exposed limit based on Invite's role settings.

Return value

The number of invitations that the module wants to limit the user to. If the module does not wish to alter the limit, it should not return anything.

1 function implements hook_invite_limit()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

invite_invite_limit in ./invite.module
1 invocation of hook_invite_limit()
invite_get_remaining_invites in ./invite.module
Calculate the remaining invites of a user.

File

./invite.api.php, line 87
API documentation for Invite module.

Code

function hook_invite_limit($account, $limit) {
  if ($account->uid == 1) {
    return 1000;
  }
}