Subversion Repositories SmartDukaan

Rev

Rev 3185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3185 Rev 6912
Line 5... Line 5...
5
import in.shop2020.thrift.clients.UserClient;
5
import in.shop2020.thrift.clients.UserClient;
6
import in.shop2020.utils.DataLogger;
6
import in.shop2020.utils.DataLogger;
7
 
7
 
8
import java.util.Date;
8
import java.util.Date;
9
 
9
 
-
 
10
import org.apache.log4j.Logger;
10
import org.apache.struts2.convention.annotation.Result;
11
import org.apache.struts2.convention.annotation.Result;
11
import org.apache.struts2.convention.annotation.Results;
12
import org.apache.struts2.convention.annotation.Results;
12
 
13
 
13
/**
14
/**
14
 * @author rajveer
15
 * @author rajveer
Line 23... Line 24...
23
 
24
 
24
	
25
	
25
	/**
26
	/**
26
	 * 
27
	 * 
27
	 */
28
	 */
-
 
29
    private static Logger log = Logger.getLogger(Class.class);
28
	private static final long serialVersionUID = 1L;
30
	private static final long serialVersionUID = 1L;
29
	/**
31
	/**
30
	 * 
32
	 * 
31
	 */
33
	 */
32
	
34
	
Line 40... Line 42...
40
		if(this.userinfo.isLoggedIn()){
42
		if(this.userinfo.isLoggedIn()){
41
			logoutUser(this.userinfo.getUserId());
43
			logoutUser(this.userinfo.getUserId());
42
			//Clean the old userinfo
44
			//Clean the old userinfo
43
			userinfo = new UserSessionInfo();
45
			userinfo = new UserSessionInfo();
44
			clearUserCookies();
46
			clearUserCookies();
45
		}	
47
		}
-
 
48
		try {
46
		DataLogger.logData(EventType.LOGOUT, getSessionId(), userinfo.getUserId(), userinfo.getEmail());
49
		    DataLogger.logData(EventType.LOGOUT, getSessionId(), userinfo.getUserId(), userinfo.getEmail());
-
 
50
		} catch(Exception e) {
-
 
51
		    log.error("Unable to logDate on AppEngine", e);
-
 
52
		}
47
		return "success";
53
		return "success";
48
    	
54
    	
49
    }
55
    }
50
        
56
        
51
 
57