I am in need of the invite module to not only escalate user roles for newly registered users, but also for existing users.
Basically, there needs to be a way in the admin panel to disable the "filter out registered users" function so that the email still goes out. So, instead of receiving the error message saying the user already exists and not sending out the email to that email address, it should still send out the email and only alert the user that the email address is already registered to an account. It's nasty, but for now, I simply commented out: $failed_emails = _invite_validate_emails("SELECT mail AS email FROM {users} WHERE mail IN (%s)", $emails);
Then, when the invited person clicks on the [join-link] in the email, whether they're logged in or not, it needs to check to see if that recipient's email is associated with a user account in the database. If it isn't -> registration page and escalation after registration / invite stats updated. If it is and they're not logged in -> login page and escalation after login / invite stats updated. If it is and they are logged in ->escalation / invite stats updated.
What'd be even nicer, is if you could configure a custom page redirection for all three scenarios. But that could come later down the road and can even be partially dealt with through another available Drupal module.
Comments
Comment #1
bobject commentedi have a similar problem.
i would like to have users with role 'inviter' to be able to invite 10 people to the site and automatically give them the role of 'premium user'
that works great if they are not users yet.
if the emailaddress is already in the database (they are already registered user) the role of 'premium' should just be added to the existing user...
has anybody tackled this problem?
Comment #2
smk-ka commentedJust a note to myself (or anybody else who's willing on this issue):
Split the validation handlers into multiple functions, and set them as $form['#validate'] callbacks (see user.module, user_login_default_validators()).
This would allow developers to selectively unset them.
Comment #3
kenorb commentedthe same problem
Comment #4
ckngCleaning out old issues.