Can an admin create a staged user?

I asked this in another thread, but it’s last post before mine was 5 years ago, so maybe it won’t get as much attention as a new topic.

I have a question from a non-devleoper’s perspective.

I’m using Discourse as our company’s ticket system and I have it set up successfully to create new topics from non-registered users in our support forum.

Occasionally, I need to create a ticket on behalf of a customer instead of them creating it directly.

Is there an easy step by step way to do this and create a topic on behalf of someone that does not already have an account on the forum? I don’t want them to have a full account unless they sign up for one themselves.

If it has to be done from a command line interface, that’s fine, but I need some hand holding such as:

  1. Enter container with foo
  2. Type rails bar etc etc
  3. Whatever else needs to be done

I’m aware that I can reassign posts so if it’s too complicated to do everything, just the instructions to create the user, then using the GUI to change owner would be very helpful.

As long as I can write a detailed help desk article for the rest of the staff to follow I don’t care what it entails. Would be awesome not to have to have all staff needing access to the container via ssh, but we’ll make due if that’s unavoidable.

2 Likes

Do you have an email from the customer? if so you can forward it to Discourse and it will create a staged user for them.

There’s a little on this behavior here in the “forwarded emails behavior” I think you’d want to change the relevant setting to “create replies”

3 Likes

Not generally a direct e-mail. Most of the time it’s my boss forwarding me an e-mail from the customer and asking me to turn it into a ticket in order to reply to them.
I’m guessing all that would do is create the topic using my boss’s e-mail as the user assigned to who created the ticket.

You can also create a staged user by simply sending them a PM, and pasting in the email address as the recipient. If they are not a member already then they will have a staged user account. If they log in later using the same email address, their account will transform magically and they will see their PMs on the site.

1 Like

This is probably the answer I’m looking for. I’ll report back as soon as I get a chance to try it out.

Another nice trick, if you are using a group for sharing the handling of tickets with a team, is to include that group when you send the PM. That way it will be sent from the group and any replies will also come back to the group.

Good to know, but I’ve set up the ticket system to contain everything within Discourse.

It’s been working very well so far except for one client that uses their own ticket system to send support requests to us, once I have more clarity on the issue I may start another topic to try and get them sorted.

1 Like

Oh wait, not sure why I wrote “google group” - I corrected my post. :facepalm: I meant a Discourse group of course.

Well that makes more sense, but we actually don’t use groups. We use accounts only, and topics to track tickets.

This used to work for us. I just had to use it again and now I get a pop up message that says:
An error occurred: You must select a valid user.

Any idea how to get this working again?

Are you an admin or moderator, or in a group that is specified in the Send email messages allowed groups site setting? If not, then that error makes sense.

I think then you see a different error

This error seems to be caused by another check that checks for a username, group, or email address entered into the recipient field

@tknospdr what exactly did you enter into the recipient field? Was there anything special about that e-mail address?

1 Like

I am logged in as the site admin when this error occurs.

I’m using a plus address to test with but the error first occurred when I tried to create a new user as I have done in the past and got the same result.

Sending PMs as an email definitely works for me. I don’t understand why it doesn’t work for you. Maybe it would help if you recorded an example? You can enter something like discourse@example.com so you don’t need to share an email address.


Well that’s SO odd. I just tried with example@example.com and it worked.

So it doesn’t work with “+” addresses, and I suppose there could have been something odd about the original client’s address that sparked this issue in the first place.
We’ve already gone the long way around to get them into the system so I’m not sure what was up.

Thanks again for the help, even though it turns out to be a non-issue!

2 Likes

Is Normalize emails enabled on your site, perchance?

Check if normalized email is unique. Normalized email removes all dots from the username and everything between + and @ symbols.

When I enable that setting, the error message when I use an email address with + character, I get is this:

An error occurred: One of the users you are sending this message to could not be found.

When I disable the setting, the PM is created and the staged user is created and gets the email.

Yes, normalized emails was checked, it turned it off and now I can create staged users with plus addressing.

After further testing that only allows me to create plus addresses when there’s already another user (me for instance) using the normalized version of the address.
Even with it checked I could do a random plus address IE test+this@thing.com was created, but david+test@example.com wasn’t created since david@example.com already existed.
I guess that’s as expected.

I’ve never noticed that but if it’s intentional then that is indeed very clever! That is kind of the point of it.. to allow you to use one email address to create a bunch of test user accounts.