1
0
Fork 0
forked from forgejo/forgejo

more minor fix on 1581

This commit is contained in:
Unknwon 2015-09-10 15:45:03 -04:00
parent 26ac016b9f
commit fa728d8dff
9 changed files with 70 additions and 70 deletions

View file

@ -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