MCPcopy Create free account
hub / github.com/TalkingData/owl / updateUserProfile

Method updateUserProfile

api/mysql.go:791–800  ·  view source on GitHub ↗

更新用户配置信息

(user *User)

Source from the content-addressed store, hash-verified

789
790//更新用户配置信息
791func (d *db) updateUserProfile(user *User) error {
792 rawSQL := fmt.Sprintf("update user set display_name='%s', password='%s', phone='%s', wechat='%s', update_at='%s' where id=%d",
793 user.DisplayName, user.Password, user.PhoneNum, user.Wechat, time.Now().Format(timeFormat), user.ID)
794 log.Println(rawSQL)
795 if _, err := d.Exec(rawSQL); err != nil {
796 log.Println(err)
797 return err
798 }
799 return nil
800}
801
802//设置用户角色
803func (d *db) setUserRole(userID int, roleNum int) error {

Callers 3

resetUserPasswordFunction · 0.80
updateUserProfileFunction · 0.80
changeUserPasswordFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected