commit sharing note

This commit is contained in:
binnchx
2015-01-11 17:59:07 +08:00
parent a393bb8723
commit a851aaa399
5 changed files with 179 additions and 88 deletions

View File

@@ -48,6 +48,13 @@ func (this *UserService) GetUsername(userId string) string {
return user.Username
}
// 得到用户名
func (this *UserService) GetUsernameById(userId bson.ObjectId) string {
user := info.User{}
db.GetByQWithFields(db.Users, bson.M{"_id": userId}, []string{"Username"}, &user)
return user.Username
}
// 是否存在该用户 email
func (this *UserService) IsExistsUser(email string) bool {
if this.GetUserId(email) == "" {