Sorry if I'm asking a dumb question, but is there a way for the administrator to give users additional invites (on an individual basis) after they run out of theirs?

CommentFileSizeAuthor
#8 129339-8-invites_per_user.patch12.17 KBadammalone
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smk-ka’s picture

Component: Miscellaneous » Code
Category: support » feature

Unfortunately not. I've already thought of assigning an individual invite count to each user. This would allow us to assign new invited users half as many invites as the inviter, like GMail does.

If you can provide a patch, I'd be happy reviewing it...
--
Stefan Kudwien
http://www.unleashedmind.com

BioALIEN’s picture

assign new invited users half as many invites as the inviter

This is a very nice idea indeed.

cozzi’s picture

It might be nice to somehow give out individual additional invites by way of the User Points module.

smk-ka’s picture

Title: managing users' invites » Add individual invite count per user

Better title.

smk-ka’s picture

Version: 5.x-1.6 » 5.x-2.x-dev
Assigned: Unassigned » smk-ka

From http://drupal.org/node/169014:

In my dreams invitation system works like this:
- every user starts with X invitations
- if a user is out of invitations, he can ask for more from the dite admin
- after that the site adin can give him more invittions to send

nlvp’s picture

I was looking for this. Are there any plans afoot to implement this feature? It's very useful for viral sites seeking to maintain some sort of exclusivity.

I'd love to do it, but my coding skills are not even remotely up to it.

Rgds,

Nicolas.

adammalone’s picture

Version: 5.x-2.x-dev » 7.x-2.x-dev
Assigned: smk-ka » Unassigned

I've written a sub-module that addresses this. I have to comment a little and then I'll submit here as a patch.

adammalone’s picture

This patch could be a little rough around the edges:

Pros:

  • Each user can have invites independently of other users
  • Can add numbers of invites to users individually or to a role as a whole
  • Respects infinite invitations and this too can be given to users
  • Shows number of invites remaining on the user's invite tab - see pic
  • I've done a bit of testing and it seems to work but really needs a couple of other people to have a look to identify bugs
  • upgrade hook already in place so should drop straight into 7.x-2.x and update the database schema after accessing update.php

Cons:

  • At the moment it does not use batch operations which a large site would benefit from when updating large numbers of user's invitations. Locally I updated ~900 users in one shot without it timing out so getting batch working would probably be useful to all those sites with >~1500 users.

It might be a terrible patch but after writing a submodule for invite that used the invite hooks I decided to just patch the module with the functionality I desired.

adammalone’s picture

Title: Add individual invite count per user » Add individual invite count per user [patch attached]
Status: Active » Needs review