remove useless code

Signed-off-by: hao.cheng <hao.cheng@daocloud.io>
This commit is contained in:
hao.cheng 2019-10-25 15:19:10 +08:00
parent 3810dcef0f
commit 94bc8c2f5c

View File

@ -284,12 +284,9 @@ func IsSuperUser(username string) bool {
// CleanUser - Clean this user information from DB // CleanUser - Clean this user information from DB
func CleanUser(id int64) error { func CleanUser(id int64) error {
if _, err := GetOrmer().QueryTable(&models.User{}). _, err := GetOrmer().QueryTable(&models.User{}).Filter("UserID", id).Delete()
Filter("UserID", id).Delete(); err != nil {
return err return err
} }
return nil
}
// MatchPassword returns true is password matched // MatchPassword returns true is password matched
func matchPassword(u *models.User, password string) bool { func matchPassword(u *models.User, password string) bool {