We've moved discussions to Discord

Can't invite existing user to an account?

Brian Casel
User A creates an account called "Company X".

User B registers their own personal account.

User A invites User B's email address as a member of "Company X".

User B receives the invite email and clicks the link... It leads to the registration page where User B is expected to enter their name, email, and password (as if the app didn't recognize that an already registered email was invited)... That seems off.

And then I entered User B's email address, and sure enough, it can't be registered, which means User B cannot accept this invite to "Company X".

Is this the expected behavior?  I would think that the logic should recognize when an already-registered email is invited to an account, and then bypass user registration and immediately "confirm" that invitee.  

Am I missing something? 
I was wondering the same thing.

At least an invitation to register shouldn't be sent if the invited email already existed in the users table as a registered user.

I love everything about jumpstart except the "Account" thing still confuses me. 
Rob Jonson
I just did a quick test on this

  1. User A creates an account called "Company X".
  2. User B registers their own personal account.
  3. User A invites User B's email address as a member of "Company X".
  4. User B receives the invite email and clicks the link... 
  5. User B is given option to create an account or sign in
  6. User B signs in
  7. Everything works as expected

I agree that this could be finessed if step 5 'knew' the user has an account and only offered the sign-in option, but the existing setup doesn't seem terrible...
iqbal Hasnan
I noticed that too. I made some adjustments to the AccountInvitations & Sessions controllers so it redirects to the sign_in page when the email exists..
Donn Felker
iqbal Hasnan  mind sharing those changes?
Notifications
You’re not receiving notifications from this thread.