diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-13 21:00:12 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-13 21:00:12 -0400 |
commit | d2b53dd43b3bc9719985033bc92b76abb9515b4d (patch) | |
tree | f6c038f0b8c11e8a01d7cd26d6bbdb14144696b3 /models/oauth2.go | |
parent | 4b9b8024ba59b5b84d92dca650761b35ebf6408a (diff) | |
download | gitea-d2b53dd43b3bc9719985033bc92b76abb9515b4d.tar.gz gitea-d2b53dd43b3bc9719985033bc92b76abb9515b4d.zip |
Add weibo oauth
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 +} |