Command line "create_user" doesn't send email

Hello,

Email’s working correctly on my machine.

If I do

platform -create_user -team_name=“myteam” -email="foo@bar.com" -password=“mypass”

the user is created, but the introductory email isn’t sent. The user has to go to the “myteam” channel, click the “resend verification mail” and then login after the email.

Email is working - the server (a local machine) doesn’t see it until the second round.

I don’t see a command flag to “send email”

What I’d really love to see happen as a workflow is:

platform -create_user -team_name=“myteam” -email="foo@bar.com" -generate_password

< system creates user, generates random password, expires password, sends password in confirmation email >
User logs in, puts in generated password, changes password, away they go.

Opened a ticket for this for anyone interested in helping add this.

Okay, ticket was declined by triage as it didn’t meet APR criteria.

Would need specifics on requirements of password generated, additional flag to send email, and subject and body of email.

Can community help with suggestions?

create email can be:
-send_email

for the -generate-password flag if it were me I’d grab 7 (or 11) characters from /dev/random and force the user to change a password on login.

Email subject and body should be the same as system-generated email when you send email for a new user created from the web interface (reuse the same bit of code). I’d be more than happy to compose or look at that if someone thinks that would be useful.

Would the users be given the randomly generated passwords manually then? Or is an email needed with the temporary password

I would expect the user would be given the randomly generated password in an email sent by the system if the -send_email flag were set

Er… not sure about sending credentials in clear text via email. That would probably require adding a feature to force password reset on first login and possibly a feature to deactivate an account after X hours if it’s not claimed…

Just to understand, is this about a) creating a list of new users, or b) inviting a list of users to join a team by email?

If it’s b) maybe it’s better just to offer a way to use the invite new member dialog programatically?

I’d also be perfectly fine with that:

platform -create_user -team_name="myteam" -email="foo@bar.com"

would do exactly what the web interface does.

Thanks @gmehn, added an APR ticket for this feature,

Anyone interested in helping with a pull request?