Add UpdateUserInternal().

This commit is contained in:
Yang Luo
2021-06-09 21:41:27 +08:00
parent f672045b45
commit 8e5f3c18e1
3 changed files with 26 additions and 9 deletions

View File

@ -263,6 +263,11 @@ func (c *ApiController) Login() {
}
object.AddUser(user)
// sync info from 3rd-party if possible
object.SetUserOAuthProperties(user, provider.Type, userInfo)
object.LinkUserAccount(user, provider.Type, userInfo.Id)
resp = c.HandleLoggedIn(user, &form)
} else if !application.EnableSignUp {
resp = &Response{Status: "error", Msg: fmt.Sprintf("The account for provider: %s and username: %s does not exist and is not allowed to sign up as new account, please contact your IT support", provider.Type, userInfo.Username)}