diff options
author | Unknwon <u@gogs.io> | 2015-09-10 15:45:03 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-10 15:45:03 -0400 |
commit | fa728d8dff2ddb8039efc2767f4fefb2d2f62004 (patch) | |
tree | 76290247b6605e4a41ccb3eff627863687a68019 /models/login.go | |
parent | 26ac016b9fb6b3fb308996e2ee56dad0b794aa49 (diff) | |
download | gitea-fa728d8dff2ddb8039efc2767f4fefb2d2f62004.tar.gz gitea-fa728d8dff2ddb8039efc2767f4fefb2d2f62004.zip |
more minor fix on 1581
Diffstat (limited to 'models/login.go')
-rw-r--r-- | models/login.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/login.go b/models/login.go index a7d07d50f4..527b763d26 100644 --- a/models/login.go +++ b/models/login.go @@ -134,6 +134,12 @@ func (source *LoginSource) PAM() *PAMConfig { return source.Cfg.(*PAMConfig) } +// CountLoginSources returns number of login sources. +func CountLoginSources() int64 { + count, _ := x.Count(new(LoginSource)) + return count +} + func CreateSource(source *LoginSource) error { _, err := x.Insert(source) return err |