scambra/devise_invitable

HowTo: Manually resend invite

SylarRuby opened this issue · 2 comments

Hi all. Not an issue but was wondering if there was an option for manually resend an invitation? Been looking at the controller but cannot see how to manually resend.

Do I need to create a PR for this or it's there somewhere already done?

Thanks

If a user tries to invitate an already invited user, and resend_invitation is enabled, new invitation will be sent.

Also you can get the invited user record and call invite!

In both cases, new invitation token is generated, as Devise changed to save a hash of tokens for better security, so raw token is not available to send an email with the same token.

If you want both old and new invitations to work, DeviseInvitable needs to save invitation info in a different table, so an user can have many invitations and all tokens work, as requested few times, e.g. #869 and linked issues, but I couldn't work on it before.

Thanks. I guess this would do. I'll reopen if I'm struggling but should be straight forward.