Create User Button

At the moment it is not possible to create a new User from Administration > Users.
Please add a Button to create a new User from the Admin Pannel. This new User creation bypasses checks like the “reserved usernames” setting.

4 Likes

What? You don’t “create” users, they sign up.

5 Likes

for example I will create a AutoMod User for automated tasks but over the sign up methode it is not possible because the word “mod” is on the reserved usernames list.

And over the normal sign up methode i must create also a Mail Adress for this Bot Account.

You can change a username after they are signed up.

I suggest using plus-addressing (username+bot@example.org) to manage such accounts. You may of course turn off email for the user.

6 Likes

This is a good workaround but not a clean solution. Is it possible to verify this Mail Adress from the Administration panel.

1 Like

I don’t recall, I just create a new account as usual and follow the instructions. I think it is a link in an email.

1 Like

You can send a test email to the address you create by going to Admin/Emails in your Dashboard, fill in the address at the lower left, then click on “Send Test Email”.
If the test wasn’t received, go to Emails again and look in the Bounced and the Rejected tabs to see if any message has bounced or been rejected (bad address, undeliverable, etc.).

Ok but i don’t can set the mail adress to “no_email” like the system user.

Use rake admin:create to create a new user without having to go through email confirmation. There should be a better way for the admin to create additional accounts, but this seems to be the least complicated way to do it at the moment.

4 Likes

A UI on the admin dashboard? I feel like I have seen this feature as being available, not sure though cc @JammyDodger

4 Likes

This would be supremely useful for administration of small closed communities. Especially those using discourse in a business communications/knowledge base capacity

The current means are not optimal for such use cases

4 Likes

I think things have gotten a little muddled in here. :slightly_smiling_face:

To create an admin in the manner the OP is suggesting is as simple as signing up a user in the regular fashion, activating their email manually from their user page (if you need to?), and granting admin powers at the same time. You can also temporarily disable reserved usernames if you want to use one of them when you sign them up. :+1:

I create test users all the time, and it’s very quick and easy.

(and the plus address email trick @maiki suggested comes in useful too, or you can set up aliases if you have a domain inbox that supports that)

2 Likes

…and the way to do that is… ? I would like to create a test_user that doesn’t have an email and has certain access privileges, so I can use it for an API key.

1 Like

Mine tend to have alias emails so I can use them as real users, but you can do it without too. :slight_smile: There’s not a lot of magic to it:

  • Go to /signup in separate browser/private window
  • Enter email as something like NAME@email.invalid[1] (+ username and password)
  • As admin, activate the new user from their admin/user page :+1:
  • Bump trust level as required

  1. This will register as a useable email, but Discourse won’t attempt to send any emails to the .invalid ones ↩︎

1 Like

I tried test-user@email.invalid for email and a made-up password.

But I get “Sorry, there was an error authorizing your account. Please try again.” – we have an LDAP plugin (discourse-ldap-auth) enabled for our instance.

I’m a Discourse admin so I can manage users + set permissions and so forth. I just wish we had a “create user” operation within the admin screens, so we could handle this directly.

2 Likes

I’m afraid I don’t have any experience with that plugin. Can you register a new user in the regular way you would normally, and then swop the email out from their preferences?

1 Like

Can you register a new user in the regular way you would normally, and then swop the email out from their preferences?

No, the authentication through LDAP has to succeed. (I mean, yes, I could ask a user who doesn’t yet have an account on Discourse to sign up and sacrifice their account so I could use it for my test purposes… but that’s not realistic.)

I’ve tried the + email approach — e.g. if my user name is splendid@foobar.com, and I have an account in Discourse, then I could create another account with splendid+test@foobar.com — but it isn’t permitted. Only the exact email account matches for LDAP authentication.

I really just want a test account, something like discobot or system but with reduced privileges.

1 Like

I don’t remember the exact details, but I think there was a way to either disable ldap and login locally, or have both types of log in possible. Something like enabling these:


and disabling one or two of the ldap login settings. I’m not recommending you mess with this on production just in case, but if you have a staging server see if changing those makes it possible to resolve the first login.

Otherwise is there anyone with an LDAP account who has left the platform? For our server I ended up anonymising someone who had left. It basically decouples the account from email and login, but keeps the account there so I can give it a variety of permissions and impersonate it(after giving it an appropriate name). Likewise I gave it some API keys and use it to perform automated tasks.

1 Like

Huh. OK, I’ll try that…

1 Like