diff --git a/models/login.go b/models/login.go index 78ce79cff..b53cdbdd9 100644 --- a/models/login.go +++ b/models/login.go @@ -193,6 +193,10 @@ func UserSignIn(uname, passwd string) (*User, error) { if !u.ValidatePassword(passwd) { return nil, ErrUserNotExist{u.Id, u.Name} } + // If not active, return error + if !u.IsActive { + return nil, ErrUserNotExist{u.Id, u.Name} + } return u, nil }