Skip to content

Commit 4868ec8

Browse files
idp-go-sdk: Add IsUserValid
1 parent de1d815 commit 4868ec8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

integrations/idp-go-sdk/idp/model.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,16 @@ const (
3535
ProviderGithub Provider = "github"
3636
ProviderDiscord Provider = "discord"
3737
)
38+
39+
func IsUserValid(user *User) bool {
40+
if user == nil {
41+
return false
42+
}
43+
if !user.IsActive {
44+
return false
45+
}
46+
if !user.Verified {
47+
return false
48+
}
49+
return true
50+
}

0 commit comments

Comments
 (0)