mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-30 11:06:37 -04:00
oauth_google_callback.go: use commenterGetByEmail
This commit is contained in:
@ -39,8 +39,8 @@ func googleCallbackHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
exists, err := commenterIsProviderUser("google", user["email"].(string))
|
c, err := commenterGetByEmail("google", user["email"].(string))
|
||||||
if err != nil {
|
if err != nil && err != errorNoSuchCommenter {
|
||||||
fmt.Fprintf(w, "Error: %s", err.Error())
|
fmt.Fprintf(w, "Error: %s", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -69,6 +69,8 @@ func googleCallbackHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
fmt.Fprintf(w, "Error: %s", err.Error())
|
fmt.Fprintf(w, "Error: %s", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
commenterHex = c.CommenterHex
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := commenterSessionUpdate(session, commenterHex); err != nil {
|
if err := commenterSessionUpdate(session, commenterHex); err != nil {
|
||||||
|
Reference in New Issue
Block a user