| Line 84... |
Line 84... |
| 84 |
addActionMessage("PrivateDealUser");
|
84 |
addActionMessage("PrivateDealUser");
|
| 85 |
}*/
|
85 |
}*/
|
| 86 |
return "redirect";
|
86 |
return "redirect";
|
| 87 |
} else {
|
87 |
} else {
|
| 88 |
addActionError(UserMessage.USER_AUTHENTICATION_FAILURE);
|
88 |
addActionError(UserMessage.USER_AUTHENTICATION_FAILURE);
|
| 89 |
DataLogger.logData(EventType.LOGIN_FAILED, getSessionId(), userinfo.getUserId(), this.request.getParameter("email"));
|
89 |
// DataLogger.logData(EventType.LOGIN_FAILED, getSessionId(), userinfo.getUserId(), this.request.getParameter("email"));
|
| 90 |
return "login";
|
90 |
return "login";
|
| 91 |
}
|
91 |
}
|
| 92 |
}
|
92 |
}
|
| 93 |
|
93 |
|
| 94 |
private boolean loginUser() {
|
94 |
private boolean loginUser() {
|
| Line 206... |
Line 206... |
| 206 |
userinfo.setPrivateDealUser(isPrivateDealUser());
|
206 |
userinfo.setPrivateDealUser(isPrivateDealUser());
|
| 207 |
String src = user.getSource();
|
207 |
String src = user.getSource();
|
| 208 |
if (src == null) {
|
208 |
if (src == null) {
|
| 209 |
src = "";
|
209 |
src = "";
|
| 210 |
}
|
210 |
}
|
| 211 |
DataLogger.logData(EventType.LOGIN_SUCCESS, getSessionId(), userinfo.getUserId(),
|
211 |
// DataLogger.logData(EventType.LOGIN_SUCCESS, getSessionId(), userinfo.getUserId(),
|
| 212 |
email, src);
|
212 |
// email, src);
|
| 213 |
return true;
|
213 |
return true;
|
| 214 |
} catch (Exception e) {
|
214 |
} catch (Exception e) {
|
| 215 |
log.error(UserMessage.USER_AUTHENTICATION_FAILURE, e);
|
215 |
log.error(UserMessage.USER_AUTHENTICATION_FAILURE, e);
|
| 216 |
return false;
|
216 |
return false;
|
| 217 |
}
|
217 |
}
|
| Line 265... |
Line 265... |
| 265 |
in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
|
265 |
in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
|
| 266 |
try{
|
266 |
try{
|
| 267 |
user = userClient.createUser(user);
|
267 |
user = userClient.createUser(user);
|
| 268 |
}catch (UserContextException ux){
|
268 |
}catch (UserContextException ux){
|
| 269 |
addActionError("User already exists with this email id.");
|
269 |
addActionError("User already exists with this email id.");
|
| 270 |
DataLogger.logData(EventType.REGISTER_FAILED_USER_EXISTS, getSessionId(), userinfo.getUserId(), email, "", email);
|
270 |
// DataLogger.logData(EventType.REGISTER_FAILED_USER_EXISTS, getSessionId(), userinfo.getUserId(), email, "", email);
|
| 271 |
return false;
|
271 |
return false;
|
| 272 |
}
|
272 |
}
|
| 273 |
this.userId = user.getUserId();
|
273 |
this.userId = user.getUserId();
|
| 274 |
long userId = user.getUserId();
|
274 |
long userId = user.getUserId();
|
| 275 |
userClient.setUserAsLoggedIn(userId, (new Date()).getTime());
|
275 |
userClient.setUserAsLoggedIn(userId, (new Date()).getTime());
|
| Line 304... |
Line 304... |
| 304 |
|
304 |
|
| 305 |
if (cookiesMap.containsKey(TrackingInterceptor.AFF_COOKIE)) {
|
305 |
if (cookiesMap.containsKey(TrackingInterceptor.AFF_COOKIE)) {
|
| 306 |
long affId = Long.parseLong(cookiesMap.get(TrackingInterceptor.AFF_COOKIE).getValue());
|
306 |
long affId = Long.parseLong(cookiesMap.get(TrackingInterceptor.AFF_COOKIE).getValue());
|
| 307 |
userClient.addTrackLog(affId, userId, TrackLogType.NEW_REGISTRATION, "",email, (new Date()).getTime());
|
307 |
userClient.addTrackLog(affId, userId, TrackLogType.NEW_REGISTRATION, "",email, (new Date()).getTime());
|
| 308 |
}
|
308 |
}
|
| 309 |
DataLogger.logData(EventType.REGISTER_SUCCESS, getSessionId(), userinfo.getUserId(), email, "", email);
|
309 |
// DataLogger.logData(EventType.REGISTER_SUCCESS, getSessionId(), userinfo.getUserId(), email, "", email);
|
| 310 |
|
310 |
|
| 311 |
return true;
|
311 |
return true;
|
| 312 |
} catch (TTransportException e) {
|
312 |
} catch (TTransportException e) {
|
| 313 |
log.error("Unable to register user." + e);
|
313 |
log.error("Unable to register user." + e);
|
| 314 |
} catch (UserContextException e) {
|
314 |
} catch (UserContextException e) {
|