嘿嘿
This commit is contained in:
@@ -213,7 +213,7 @@ func GetUserBindAuthInfo(ctx *jxcontext.Context) (authList []*model.AuthBind, er
|
||||
func CreateUser(user *model.User, creatorName string) (err error) {
|
||||
globals.SugarLogger.Debugf("CreateUser user:%s, creatorName:%s", utils.Format4Output(user, true), creatorName)
|
||||
|
||||
if user == nil || user.UserID2 == "" || user.Name == "" {
|
||||
if user == nil || user.UserID2 == "" {
|
||||
return ErrUserIDAndNameMustGiven
|
||||
}
|
||||
if user.GetMobile() == "" {
|
||||
|
||||
@@ -262,6 +262,9 @@ func (c *User2Controller) UpdateUserByMiniInfo() {
|
||||
if userInfo.PurePhoneNumber != "" {
|
||||
user.Mobile = utils.String2Pointer(userInfo.PurePhoneNumber)
|
||||
}
|
||||
if userInfo.NickName != "" {
|
||||
user.Name = userInfo.NickName
|
||||
}
|
||||
_, err = dao.UpdateEntity(dao.GetDB(), user)
|
||||
if err != nil && dao.IsDuplicateError(err) {
|
||||
if mobileAuth, err2 := auth2.LoginInternal(params.Ctx.Context, auth2.AuthTypeMobile, userInfo.PurePhoneNumber, auth2.UserIDMobile, auth2.InternalAuthSecret); err2 == nil {
|
||||
|
||||
Reference in New Issue
Block a user