When an existing staged user Joins my site, filled in user custom fields data isn't saved

I have some potential users who struggle to sign up. They get in touch with the Mods via email-in for support and so create a staged user account.

Usually the problem is easily resolved, and they sign-up and fill in all of the fields. Of note, we have several mandatory user custom fields (UCFs).

I’ve noticed that the UCF data never sticks in the database for these staged users. They then need to be chased up and manually managed.

I can work around this by having a Custom Wizard gather the data instead, but the underlying problem / bug should probably be fixed.

5 Likes

I am able to reproduce this bug and I think we should fix it.

  1. create a group that accepts email from any email address
  2. create some custom user fields
  3. email the group set up in (1) from an email address not already associated with an account on the site, which creates staged user with that email address
  4. create an account using same email address as staged user
  5. when prompted, complete the user fields
  6. go to user profile and see that the user fields are not filled

When you create an account using an email address that is not already connected to a staged user account the custom user fields are filled as you’d expect.

5 Likes

I am trying to debug this issue, but after a while, I still cannot reproduce it.

I tested it on a clean install. The only settings changed are:

  • pop3 polling enabled
  • pop3 polling host
  • pop3 polling username
  • pop3 polling password
  • email in.

I did the following:

  1. I created a new group, only setting the name and “Custom incoming email address”. The group allows emails from any email address.

  2. I created multiple custom user fields. I tried “Text Field”, “Confirmation”, and “Dropdown” types. I tested both required and optional fields and both editable and non-editable fields.

  3. I sent an email to the group address from a new email address. This creates the staged user as expected.

  4. I created a new account using the same email address I used to send the email earlier, filling in the mandatory custom fields.

  5. The staged user is converted to a normal user, and the custom fields are saved and present under u/user/preferences/profile.

Can you still repro this one? If so, do you have an idea of what might be different in my setup to produce a different result?

4 Likes

The only obvious difference is that our instance uses direct incoming email and has a Custom Wizard fire when they first log in.

I’ll go and test ours again, as well as a simpler site (also with direct incoming email) and report back. Might take a few days though sorry.

3 Likes

I am also still able to repro with the steps I provided above. My site also uses direct incoming email. It’s an invite only site too so I sent an invite link to create the account. To confirm the invite link is not the issue I turned on registration temporarily to create the account. Same issue - no custom user fields.

Can you go through the repro steps one more time, and be extra careful to use incognito mode or a different chrome profile when sending the email and creating the user account?

3 Likes

It might well be that it is an unexpected interaction with direct incoming email. I don’t recall ever noticing it before implementing direct incoming email, that is for sure.

If you still can’t repro it, please set this up and try again:

1 Like

I am also able to repro this on our own hosting, on a business plan trial. @jancernik look for an invite in your email so you can repro it there too.

On our hosting, you have to also enable the email in admin setting in order for the Custom incoming email address group setting to appear. That threw me for a loop.

Screenshot 2023-05-10 at 7.08.05 AM

Also the copy for this setting is confusing on our hosting because no additional manual or pop3 polling needs to be set up - it works out of the box. I will update it.

Edit: I updated the copy in this PR to simplify it:

Allow users to post new topics via email. After enabling this setting, you will be able to configure incoming email addresses for groups and categories.

2 Likes

To clarify, if email in is disabled, can you still repro the issue in the OP?

You can’t follow my repro steps in the 2nd post above without enabling email in because that includes creating a staged user by sending an email to the forum to create a new group message.

But you can also repro the problem without email in enabled by sending a PM to an email address to create the staged user, then signing up with that email address. I just tested it.

2 Likes

Any joy with this?

I ask because I’m about to add approx 100 folk as staged users. They were subscribed to an existing external newsletter via an email list, but we intend for this to be delivered by our site instead.

Our hope is that many of them will sign up as well, but this will be pretty messy if their UCFs don’t come through!

1 Like

It is on our list to sort out, but we are probably a few weeks from resolving it

3 Likes

We have a fix here now thanks to @daniel, via FIX: Staged user creation loses user custom field data by pmusaraj · Pull Request #22206 · discourse/discourse · GitHub

Can you give this a test please @tobiaseigen @nathank ?

5 Likes

I tested using my repro steps above and can confirm this is fixed! Nice job! This was a hairy one.

I did have a minor scare because the first time I looked at the profile as admin the fields were not displayed. But upon browser refresh they appeared. :sweat_smile:

6 Likes