Subversion Repositories SmartDukaan

Rev

Rev 824 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 824 Rev 828
Line 102... Line 102...
102
		if(userCookie != null){
102
		if(userCookie != null){
103
			String uidString = userCookie.getValue();
103
			String uidString = userCookie.getValue();
104
			if(uidString != null){
104
			if(uidString != null){
105
				try {
105
				try {
106
					Long receivedUID = Long.parseLong(desEncrypter.decrypt(uidString));
106
					Long receivedUID = Long.parseLong(desEncrypter.decrypt(uidString));
-
 
107
                    log.info("Invalid session with user cookie : " + receivedUID);
107
					userInfo = new UserSessionInfo(receivedUID, session.getId());
108
					userInfo = new UserSessionInfo(receivedUID, session.getId());
108
					session.setAttribute(USER_INFO, userInfo);
109
					session.setAttribute(USER_INFO, userInfo);
109
				} catch (NumberFormatException nfe) {
110
				} catch (NumberFormatException nfe) {
110
					log.error("The UID cookie contains an unparseable userID");
111
					log.error("The UID cookie contains an unparseable userID");
111
				}
112
				}
112
			}
113
			}
-
 
114
		}else{
-
 
115
			session.setAttribute(USER_INFO, userInfo);
-
 
116
            userInfo = new UserSessionInfo(session.getId());
-
 
117
            log.info("Invalid session without user cookie.");
113
		}
118
		}
114
		return userInfo;
119
		return userInfo;
115
	}
120
	}
116
}
121
}
117
122