A user reports that invite links, which previously worked for admin users by adding them to groups and redirecting to a topic, now show an error for admins: Validation failed: Primary email has already been taken. The issue is not related to username length settings, as confirmed by the user. The error occurs in the invite_redeemer.rb model when attempting to create a user from an invite. The user expects the behavior to be consistent with standard users, where the link simply adds the user to the group and redirects. gassim provides logs showing the error, and JammyDodger suggests checking /logs for more details.
The invitation links are created by system, adds users to groups and redirects them to topic post. Working well for standard users and have been so for a while now. However, this error started appearing only for admin users.
Please help! I’m posting this with hopes that this will be fixed and it won’t be something we’ll need to fix for standard users as well.
Thanks! However, it doesn’t seem relevant nor is it a similar situation.
We’re not making any change here. The invite links used to work but now when an admin clicks on an invite link the error above appears which never appeared before.
That was a bit of a longshot. I thought possibly the admin invite links were causing a similar conflict, but if you haven’t updated that setting then perhaps not.
Hopefully your /logs can provide more detailed info for the error?
Here’s the /log error (which is not supposed to happen): ActiveRecord::RecordInvalid (Validation failed: Primary email has already been taken) app/models/invite_redeemer.rb:72:in `create_user_from_invite' app/models/invite_redeemer.rb:144:in `get_invited_us
Failed to handle exception in exception app middleware : ActiveRecord::RecordInvalid : Validation failed: Primary email has already been taken
It’s not supposed to do that! What it used to do before is that if I’m logged in and used an invite link, it would simply add me to the group (if I’m not already a member in) and it’d redirect me to the topic post.