diff --git a/dao/user.go b/dao/user.go index a8e53b293..b8ded99fe 100644 --- a/dao/user.go +++ b/dao/user.go @@ -69,7 +69,7 @@ func LoginByDb(auth models.AuthModel) (*models.User, error) { o := orm.NewOrm() var users []models.User - n, err := o.Raw(`select * from user where (username = ? or email = ?)`, + n, err := o.Raw(`select * from user where (username = ? or email = ?) and deleted = 0`, auth.Principal, auth.Principal).QueryRows(&users) if err != nil { return nil, err