Merge pull request #95 from Deathis/dev

修复移动端用户头像不是绝对地址导致某些情况地址错误的问题
This commit is contained in:
life
2015-03-29 00:14:18 +08:00

View File

@ -98,6 +98,7 @@ func (this *UserService) GetUserInfo(userId string) info.User {
func (this *UserService) GetUserInfoByEmail(email string) info.User {
user := info.User{}
db.GetByQ(db.Users, bson.M{"Email": email}, &user)
this.setUserLogo(&user)
return user
}
// 得到用户信息 username
@ -105,12 +106,14 @@ func (this *UserService) GetUserInfoByUsername(username string) info.User {
user := info.User{}
username = strings.ToLower(username)
db.GetByQ(db.Users, bson.M{"Username": username}, &user)
this.setUserLogo(&user)
return user
}
func (this *UserService) GetUserInfoByThirdUserId(thirdUserId string) info.User {
user := info.User{}
db.GetByQ(db.Users, bson.M{"ThirdUserId": thirdUserId}, &user)
this.setUserLogo(&user)
return user
}
func (this *UserService) ListUserInfosByUserIds(userIds []bson.ObjectId) []info.User {
@ -223,7 +226,7 @@ func (this *UserService) LoginGetUserInfo(emailOrUsername, md5Pwd string) info.U
} else {
db.GetByQ(db.Users, bson.M{"Username": emailOrUsername, "Pwd": md5Pwd}, &user)
}
this.setUserLogo(&user)
return user
}