Method: Gitlab::Client::Users#create_user
- Defined in:
- lib/gitlab/client/users.rb
#create_user(*args) ⇒ Gitlab::ObjectifiedHash
Creates a new user. Requires authentication from an admin account.
52 53 54 55 56 57 58 59 |
# File 'lib/gitlab/client/users.rb', line 52 def create_user(*args) = args.last.is_a?(Hash) ? args.pop : {} raise ArgumentError, 'Missing required parameters' unless args[2] body = { email: args[0], password: args[1], username: args[2], name: args[0] } body.merge!() post('/users', body: body) end |