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.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/gitlab/client/users.rb', line 50 def create_user(*args) = Hash === args.last ? args.pop : {} if args[2] body = { email: args[0], password: args[1], username: args[2] } else body = { email: args[0], password: args[1], name: args[0] } end body.merge!() post('/users', body: body) end |