Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
yes, you can remove the check if you want. The reason of that limitation is that if you invite too many people, you will send lots of mails, and the submission of the form could take too long. The correct implementation would be a batch (queue) that runs at cron time, but with the current implementation we just use a maximum number of invites per submission.
But, if you want to increase the limit or remove it, you can do this, it will not affect any other features.
Actually, this moduel as designed does not handle a high number of attendees. For this we need:
1) to not limit the number of invitees
-define('OG_INVITE_LINK_MAX_INVITES_PER_FORM', 20);
+define('OG_INVITE_LINK_MAX_INVITES_PER_FORM', 2000);
2) to not limit the field lenght
$form['invitees'] = array(
'#type' => 'textfield',
'#title' => t('Invitees'),
- '#maxlength' => 1024,
+ '#maxlength' => 10000,
3) not sending a per invitee email notification to admins, but rather a summary of the invitation equivalent to the message that is displayed after processing the invitation.
I know that this module will not evolve anymore, but I'll keep this for further action on my side (remains to do (3))
Comments
Comment #1
vasi1186 CreditAttribution: vasi1186 commentedHi,
yes, you can remove the check if you want. The reason of that limitation is that if you invite too many people, you will send lots of mails, and the submission of the form could take too long. The correct implementation would be a batch (queue) that runs at cron time, but with the current implementation we just use a maximum number of invites per submission.
But, if you want to increase the limit or remove it, you can do this, it will not affect any other features.
Comment #2
jvieille CreditAttribution: jvieille commentedActually, this moduel as designed does not handle a high number of attendees. For this we need:
1) to not limit the number of invitees
-define('OG_INVITE_LINK_MAX_INVITES_PER_FORM', 20);
+define('OG_INVITE_LINK_MAX_INVITES_PER_FORM', 2000);
2) to not limit the field lenght
$form['invitees'] = array(
'#type' => 'textfield',
'#title' => t('Invitees'),
- '#maxlength' => 1024,
+ '#maxlength' => 10000,
3) not sending a per invitee email notification to admins, but rather a summary of the invitation equivalent to the message that is displayed after processing the invitation.
I know that this module will not evolve anymore, but I'll keep this for further action on my side (remains to do (3))