Add SignupApplication to user.

This commit is contained in:
Yang Luo
2021-06-21 10:22:47 +08:00
parent 64f85fdc6c
commit 9c233e42c0
3 changed files with 49 additions and 46 deletions

View File

@ -135,22 +135,23 @@ func (c *ApiController) Signup() {
}
user := &object.User{
Owner: form.Organization,
Name: username,
CreatedTime: util.GetCurrentTime(),
Id: id,
Type: "normal-user",
Password: form.Password,
DisplayName: form.Name,
Avatar: organization.DefaultAvatar,
Email: form.Email,
Phone: form.Phone,
Address: []string{},
Affiliation: form.Affiliation,
IsAdmin: false,
IsGlobalAdmin: false,
IsForbidden: false,
Properties: map[string]string{},
Owner: form.Organization,
Name: username,
CreatedTime: util.GetCurrentTime(),
Id: id,
Type: "normal-user",
Password: form.Password,
DisplayName: form.Name,
Avatar: organization.DefaultAvatar,
Email: form.Email,
Phone: form.Phone,
Address: []string{},
Affiliation: form.Affiliation,
IsAdmin: false,
IsGlobalAdmin: false,
IsForbidden: false,
SignupApplication: application.Name,
Properties: map[string]string{},
}
affected := object.AddUser(user)