From 97cd7a31874588982040863fa4d6a2f45ee99fe1 Mon Sep 17 00:00:00 2001 From: Chris Seto Date: Wed, 17 Jun 2015 16:57:21 -0400 Subject: [PATCH] Search in the emails field to allow users to sign in with any confirmed email --- fakecas.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakecas.go b/fakecas.go index da063d7..0e34853 100644 --- a/fakecas.go +++ b/fakecas.go @@ -100,7 +100,7 @@ func serviceValidate(w http.ResponseWriter, r *http.Request) { c := session.DB(*databasename).C("user") result := User{} - err = c.Find(bson.M{"username": r.FormValue("ticket")}).One(&result) + err = c.Find(bson.M{"emails": r.FormValue("ticket")}).One(&result) if err != nil { fmt.Println("User", r.FormValue("ticket"), "not found.")