From d2b53dd43b3bc9719985033bc92b76abb9515b4d Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 13 Apr 2014 21:00:12 -0400 Subject: Add weibo oauth --- models/oauth2.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'models/oauth2.go') 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 +} -- cgit v1.2.3