From 53a86871b8e7a352ccecab21f9edc3df025b68ce Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 25 Dec 2017 13:10:48 +0300 Subject: facebook: add email logging --- juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'juick-www/src/main') 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; -- cgit v1.2.3