When the user signup option: "Visitors, but administrator approval is required" is active, normal users who signup require admin approval.

When a user is invited with the above option enabled, the user signing up is marked as "active" yet they are still sent the awaiting approval email.

This is an issue because the invited user doesn't get sent the email with their onetime login link to access the site, instead they just get told their account needs admin approval which poses another problem: the user has been marked as active so an administrator can't distinguish which user to approve (which in theory would send the onetime login link.)

Ideal workflow:

Users who register via an invite skip the admin approval and only get sent the email with their onetime login link in.

Users who register via the registration form still require administration approval.

Comments

Anonymous’s picture

Although it should really be fixed within the module itself, I think the above functionality can be achieved through the following method:

Using the hook:hook_invite_accept(), you can send the initial login email using: _user_mail_notify('status_activated', $account);

To stop the "pending approval" email from being sent out, it's a bit of a convoluted/hacky work around but:

1. Set up a new role and call it something like: invited users
2. Set invited users to this role
3. Using the hook_mail_alter($message) function, check for the $message id & if the account has the invited users role, if it's there then unset the message variable.

glekli’s picture

Status: Active » Fixed

I updated the registration processing to fix the email/status inconsistency. To have more control over this, I added a new option to the Invite settings titled 'Require administrator approval for invitees'. This setting controls whether someone who is using an invitation to register will need to wait for approval.

With this option in place, the workflow you outline can be set up, or approval may be turned on for invitees, if so desired, and this setting will not interfere with the workflow of visitors without invitation.

Thanks, tedavis.

Anonymous’s picture

Awesomesauce!
Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.