mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GetUserInfo: Return an error if no user was found (#44169)
* return an error if no user was found * Update database.go Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
This commit is contained in:
parent
2048060df0
commit
c1ba0afdc7
@ -38,6 +38,10 @@ func (s *Implementation) GetExternalUserInfoByLogin(ctx context.Context, query *
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Implementation) GetAuthInfo(ctx context.Context, query *models.GetAuthInfoQuery) error {
|
func (s *Implementation) GetAuthInfo(ctx context.Context, query *models.GetAuthInfoQuery) error {
|
||||||
|
if query.UserId == 0 && query.AuthId == "" {
|
||||||
|
return models.ErrUserNotFound
|
||||||
|
}
|
||||||
|
|
||||||
userAuth := &models.UserAuth{
|
userAuth := &models.UserAuth{
|
||||||
UserId: query.UserId,
|
UserId: query.UserId,
|
||||||
AuthModule: query.AuthModule,
|
AuthModule: query.AuthModule,
|
||||||
|
Loading…
Reference in New Issue
Block a user