mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 18:48:02 +01:00
return nil if the user is deleted in LoginByDb()
This commit is contained in:
parent
d8785196c0
commit
7fea8c55dd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user