aboutsummaryrefslogtreecommitdiffstats
path: root/models/user_openid.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-04-09 09:40:34 +0200
committerGitHub <noreply@github.com>2021-04-09 09:40:34 +0200
commit9c4601bdf8369ed72944085e3952111cf4aeea11 (patch)
tree2dcadaabed6dbe14ddba2d2513b736ff6b7f089f /models/user_openid.go
parent0991f9aa427ab923544c35d73232fa53c9db9120 (diff)
downloadgitea-9c4601bdf8369ed72944085e3952111cf4aeea11.tar.gz
gitea-9c4601bdf8369ed72944085e3952111cf4aeea11.zip
Code Formats, Nits & Unused Func/Var deletions (#15286)
* _ to unused func options * rm useless brakets * rm trifial non used models functions * rm dead code * rm dead global vars * fix routers/api/v1/repo/issue.go * dont overload import module
Diffstat (limited to 'models/user_openid.go')
-rw-r--r--models/user_openid.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/models/user_openid.go b/models/user_openid.go
index 18cf51c6b6..597f19d77d 100644
--- a/models/user_openid.go
+++ b/models/user_openid.go
@@ -35,6 +35,7 @@ func GetUserOpenIDs(uid int64) ([]*UserOpenID, error) {
return openids, nil
}
+// isOpenIDUsed returns true if the openid has been used.
func isOpenIDUsed(e Engine, uri string) (bool, error) {
if len(uri) == 0 {
return true, nil
@@ -43,11 +44,6 @@ func isOpenIDUsed(e Engine, uri string) (bool, error) {
return e.Get(&UserOpenID{URI: uri})
}
-// IsOpenIDUsed returns true if the openid has been used.
-func IsOpenIDUsed(openid string) (bool, error) {
- return isOpenIDUsed(x, openid)
-}
-
// NOTE: make sure openid.URI is normalized already
func addUserOpenID(e Engine, openid *UserOpenID) error {
used, err := isOpenIDUsed(e, openid.URI)