CreateUser Deprecated: Use CreateUserWithOrgs instead. This will be removed. TODO: When removing, we should rename CreateUserWithOrgs -> CreateUser with an alias of CreateUserWithOrgs.
(ctx context.Context, req CreateUserRequest)
| 542 | // TODO: When removing, we should rename CreateUserWithOrgs -> CreateUser |
| 543 | // with an alias of CreateUserWithOrgs. |
| 544 | func (c *Client) CreateUser(ctx context.Context, req CreateUserRequest) (User, error) { |
| 545 | if req.DisableLogin { |
| 546 | req.UserLoginType = LoginTypeNone |
| 547 | } |
| 548 | return c.CreateUserWithOrgs(ctx, CreateUserRequestWithOrgs{ |
| 549 | Email: req.Email, |
| 550 | Username: req.Username, |
| 551 | Name: req.Name, |
| 552 | Password: req.Password, |
| 553 | UserLoginType: req.UserLoginType, |
| 554 | OrganizationIDs: []uuid.UUID{req.OrganizationID}, |
| 555 | }) |
| 556 | } |
| 557 | |
| 558 | // CreateUserWithOrgs creates a new user. |
| 559 | func (c *Client) CreateUserWithOrgs(ctx context.Context, req CreateUserRequestWithOrgs) (User, error) { |
nothing calls this directly
no test coverage detected