Issue creating users with the gitlab API
When setting up a registration script that uses the gitlab API to create gitlab user accounts, I'm running into the folowing issue:
When I POST the request with the required parameters (email, name, username, password), two mails are sent: First mail:
Subject: Confirmation instructions Body: Welcome Your name here! You can confirm your account through the link below: Confirm my account
Subject: Account was created for you Body: Hi Your name here! The Administrator created an account for you. Now you are a member of the company GitLab application. login.......................................... email@example.com — View it on GitLab
When John Doe in this example, follows the first confirmation link, he'll see a flash message:
Your account was successfully confirmed. You are now signed in.
From there, he can't change his password. Because he doesn't know his password.
To get John to work with gitlab. He should:
- Navigate to the standard login form (we have ldap enabled and that login form is displayed on top)
- click "Forgot your password?"
- fill in his mail address
- check mail
- click the "Change my password" link in the mail.
- Then set his password.
This is quite a contrast compared to an account created by an admin user in the UI:
- Hit the "New User" button in the user overview
- fill in: name, username, email and hit create user
- the user gets an email with subject: "Account was created for you", the mail contains a link set a password
Ideally, you want to have the password field optional in the user create api call. If the password is omitted, the newly create user should receive just one mail, just like when done manually through the UI.
Seems like a bug to me. All functionality seems to be there, but it looks like the wrong action is triggered.
Using the latest (7.7.1) omnibus install.