Merge pull request #9592 from qyqcswill/code_clean

remove useless code
This commit is contained in:
Daniel Jiang 2019-10-29 15:08:59 +08:00 committed by GitHub
commit b17711abbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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