Subversion Repositories SmartDukaan

Rev

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

Rev 2148 Rev 2157
Line 5... Line 5...
5
import in.shop2020.thrift.clients.UserContextServiceClient;
5
import in.shop2020.thrift.clients.UserContextServiceClient;
6
 
6
 
7
import java.util.Date;
7
import java.util.Date;
8
import javax.servlet.http.Cookie;
8
import javax.servlet.http.Cookie;
9
 
9
 
10
import org.apache.commons.lang.StringUtils;
-
 
11
import org.apache.log4j.Logger;
10
import org.apache.log4j.Logger;
12
import org.apache.struts2.convention.annotation.Result;
11
import org.apache.struts2.convention.annotation.Result;
13
import org.apache.struts2.convention.annotation.Results;
12
import org.apache.struts2.convention.annotation.Results;
14
 
13
 
15
/**
14
/**
Line 29... Line 28...
29
	 */
28
	 */
30
	private static final long serialVersionUID = 1L;
29
	private static final long serialVersionUID = 1L;
31
	/**
30
	/**
32
	 * 
31
	 * 
33
	 */
32
	 */
34
	private static Logger dataLog = DataLogger.getLogger();
-
 
35
	
33
	
36
	public LogoutController() {
34
	public LogoutController() {
37
		super();
35
		super();
38
		
36
		
39
	}
37
	}
Line 48... Line 46...
48
			uidCookie.setPath("/");
46
			uidCookie.setPath("/");
49
			uidCookie.setValue("");
47
			uidCookie.setValue("");
50
			uidCookie.setMaxAge(0);
48
			uidCookie.setMaxAge(0);
51
	    	this.response.addCookie(uidCookie);
49
	    	this.response.addCookie(uidCookie);
52
		}	
50
		}	
53
		dataLog.info(StringUtils.join(
-
 
54
                new String[] { Event.LOGOUT.name(),
-
 
55
                        userinfo.getEmail() }, ", "));
51
		DataLogger.logData(Event.LOGOUT.name(), Long.toString(userinfo.getUserId()), userinfo.getEmail());
56
		return "success";
52
		return "success";
57
    	
53
    	
58
    }
54
    }
59
        
55
        
60
 
56