diff options
Diffstat (limited to 'models/oauth2.go')
-rw-r--r-- | models/oauth2.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/oauth2.go b/models/oauth2.go index 38d21fda1c..d1ae4611b8 100644 --- a/models/oauth2.go +++ b/models/oauth2.go @@ -68,3 +68,9 @@ func GetOauth2ById(id int64) (oa *Oauth2, err error) { } return oa, nil } + +// GetOauthByUserId returns list of oauthes that are releated to given user. +func GetOauthByUserId(uid int64) (oas []*Oauth2, err error) { + err = orm.Find(&oas, Oauth2{Uid: uid}) + return oas, err +} |