aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-25 13:10:48 +0300
committerGravatar Vitaly Takmazov2017-12-25 13:10:48 +0300
commit53a86871b8e7a352ccecab21f9edc3df025b68ce (patch)
treede1f8c88baf2310b5a9d696a78b3654262ea53dc /juick-www/src/main/java/com
parentfd53685be99b2f8818e6831ec41dcff57070330f (diff)
facebook: add email logging
Diffstat (limited to 'juick-www/src/main/java/com')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java b/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java
index 170e2ac2..6e8d6864 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java
@@ -138,11 +138,13 @@ public class FacebookLogin {
String loginhash = UUID.randomUUID().toString();
if (!crosspostService.createFacebookUser(fbID, loginhash, token.getAccessToken(), fb.getName(), fb.getLink())) {
if (StringUtils.isNotEmpty(fb.getEmail())) {
+ logger.info("found {} for facebook user {}", fb.getEmail(), fb.getLink());
Integer userId = crosspostService.getUIDbyFBID(fbID);
if (!emailService.getEmails(userId, false).contains(fb.getEmail())) {
emailService.addEmail(userId, fb.getEmail());
}
}
+ logger.info("email not found for facebook user {}", fb.getLink());
throw new HttpBadRequestException();
}
return "redirect:/signup?type=fb&hash=" + loginhash;