Browse Source

Fix the deactive user can sign up bug.

pull/1618/head
ohko 9 years ago
parent
commit
9115a8d1a7
  1. 4
      models/login.go

4
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
}

Loading…
Cancel
Save