summaryrefslogtreecommitdiffstats
path: root/models/oauth2.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-06 13:47:47 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-06 13:47:47 -0400
commit7cb5a15c9b7a2a118d756d15cb745743f207a318 (patch)
treedba01566116b8ad49f0762812ecb3ab96597090f /models/oauth2.go
parente573855a4f040abd4aa6a2afa9ce610a1ec2670f (diff)
downloadgitea-7cb5a15c9b7a2a118d756d15cb745743f207a318.tar.gz
gitea-7cb5a15c9b7a2a118d756d15cb745743f207a318.zip
Batch of mirror fixes
Diffstat (limited to 'models/oauth2.go')
-rw-r--r--models/oauth2.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/oauth2.go b/models/oauth2.go
index 97ba519c57..61044d6882 100644
--- a/models/oauth2.go
+++ b/models/oauth2.go
@@ -80,3 +80,9 @@ func DeleteOauth2ById(id int64) error {
_, err := orm.Delete(&Oauth2{Id: id})
return err
}
+
+// CleanUnbindOauth deletes all unbind OAuthes.
+func CleanUnbindOauth() error {
+ _, err := orm.Delete(&Oauth2{Uid: -1})
+ return err
+}