you've reached the maximum number of invitations...
drupallogic - August 30, 2009 - 18:55
| Project: | Invite |
| Version: | 6.x-2.0-alpha1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I get a "Sorry, you've reached the maximum number of invitations." error which is not the case.
I investigated and saw that it's an old error. the last release is on April and this error is still not fixed.
is someone working on this module ?

#1
There might be some problem with settings of invite module.
You can go to page /admin/user/invite/settings and there in role settings you can check the limit invitation limit and change the variable accordingly.
I hope this solves the problem.
#2
/admin/user/invite/settings useless in this situation!
#3
bug in the invite.module (When 'authenticated user' role is localized)
<?php
function invite_get_role_limit($account) {
if (!isset($account->roles)) {
$account = user_load(array('uid' => $account->uid));
} // here 'authenticated user' role (unlocalized)
$role_limit = 0;
foreach (user_roles(0, 'send invitations') as $role) {
$role_no_space = str_replace(' ', '_', $role); // here 'зарегистрированный пользователь' role (localized)
if (in_array($role, $account->roles)) {
$role_max = variable_get('invite_maxnum_'. $role_no_space, INVITE_UNLIMITED);
if ($role_max == INVITE_UNLIMITED) {
return INVITE_UNLIMITED;
}
$role_limit = max($role_max, $role_limit);
}
}
return $role_limit;
}
?>
Temporary fix:
GOTO admin/build/translate/search
SET authenticated user=authenticated user (or delete this translation)
THAT`S ALL
TO authors:
1) please fix this bug for international community
2) also add options '1', '2', '3' to $form['role'][$role_no_space]['invite_maxnum_'. $role_no_space]
invites count list like 1,2,3,5,10,20,50,100,∞ looks better than 5,10,20,50,100,500,1000,∞
3) function _invite_escalate_role($account) do not escalate roles
Wish success you to finetune this nice module
#4
thank you for your effort. I assume some other developer should take this module. Current ones do not care any more.
#5
Works perfectly, i'm running a french website and had the same problem.
Your solution works, but is not so 'clean'. I'll try to solve the problem.