Inviting a pending member failed


(Allen - Watchman Monitoring) #1

Repro:

  • Invite someone to your discourse
  • Have a user register for a new account in your closed discourse,
  • They may see it, but do not accept/activate the account
  • Attempt to someone to a topic, the invite button will not activate (improved since first encountered)

New request… just being informed their account is pending.

Old result

  • note that discourse will say that their username is being entered, but it’s an email address

  • They will not be able to accept the second invite.

This was logged: ActiveRecord::RecordInvalid (Validation failed: Email has already been taken)

I solved this by approving their account for them, but I’d rather be told that the user had a pending account.


(Marcin Cieślak) #2

I get the same message when creating an account, not confirming the email (yet) and trying to create another one with the same email address. It looks like the account is alread “created” (the nickname and the email addres are “taken”), but unusable. I got some email setup problem when the first confirmation was sent, so I never saw the first confirmation. I managed to recover using “Forgot password” function - it accepts unconfirmed email addresses there and allows me to confirm my account.

So it looks like the invite function tries the same code path - it creates the destination account, and fails if the email address is already there…


(Jeff Atwood) #3

Can we improve the UI feedback in this case @techapj?


(Arpit Jalan) #4

I am not able to repro this issue (with must approve users setting enabled or disabled).

As per invite code, the same invite link will be sent to user when you send the invite (or topic invite) again.

Say this was the invite link when you first invited the user: http://forum.example.com/invites/dcfb11835d264086115c06e1626f1e37

Now, when you will send a topic invite to that same user/email, he will recieve the same invite link, with different email body. One more difference will be that as soon as user will accept the invite, he will be redirected to that particular topic.

I am not sure what’s the difference between “first” invite and “second” invite because they are essentially the same invite link.

Could you please further elaborate?


(Allen - Watchman Monitoring) #5

Perhaps I confused which users I invited, when… and that Izzy self registered, but did not activate his account.

Then the problem occurred when I invited him.


(Allen - Watchman Monitoring) #6

Update May 18 2015 - I have recreated the situation on my hosted discourse. It’s improved since I ran into this on my more active discourse, so we’ve got that going for us