summaryrefslogtreecommitdiffstats
path: root/models/login.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-18 18:07:04 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-18 18:07:04 -0400
commit93f8f9252304d4e8028e13dd95e4cdf2e3178594 (patch)
tree43218b1bbb2f3cb466b9afa8ed60022924526519 /models/login.go
parenta4c3ab48a52a0cade5d3c3ba76c5555ed1453566 (diff)
downloadgitea-93f8f9252304d4e8028e13dd95e4cdf2e3178594.tar.gz
gitea-93f8f9252304d4e8028e13dd95e4cdf2e3178594.zip
Finish create new label
Diffstat (limited to 'models/login.go')
-rw-r--r--models/login.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/login.go b/models/login.go
index ed5a8425a8..3efef2f78f 100644
--- a/models/login.go
+++ b/models/login.go
@@ -185,9 +185,8 @@ func LoginUser(uname, passwd string) (*User, error) {
} else {
if !has {
var sources []LoginSource
- cond := &LoginSource{IsActived: true, AllowAutoRegister: true}
- err = orm.UseBool().Find(&sources, cond)
- if err != nil {
+ if err = orm.UseBool().Find(&sources,
+ &LoginSource{IsActived: true, AllowAutoRegister: true}); err != nil {
return nil, err
}