Subversion Repositories SmartDukaan

Rev

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

Rev 830 Rev 831
Line 12... Line 12...
12
import java.util.Date;
12
import java.util.Date;
13
 
13
 
14
import org.apache.juli.logging.Log;
14
import org.apache.juli.logging.Log;
15
import org.apache.juli.logging.LogFactory;
15
import org.apache.juli.logging.LogFactory;
16
import org.apache.struts2.convention.annotation.Result;
16
import org.apache.struts2.convention.annotation.Result;
17
import org.apache.struts2.convention.annotation.Results;
-
 
18
 
17
 
19
/**
18
/**
20
 * 
19
 * 
21
 * @author rajveer
20
 * @author rajveer
22
 * 
21
 * 
Line 48... Line 47...
48
		if (loginUser()) {
47
		if (loginUser()) {
49
			redirectUrl = (String) this.session.getAttribute(LoginInterceptor.REDIRECT_URL);
48
			redirectUrl = (String) this.session.getAttribute(LoginInterceptor.REDIRECT_URL);
50
			if (redirectUrl == null) {
49
			if (redirectUrl == null) {
51
				redirectUrl = "";
50
				redirectUrl = "";
52
			}
51
			}
53
			log.debug(redirectUrl);
52
			log.info(redirectUrl);
54
			resetRedirectUrl();
53
			resetRedirectUrl();
55
			return "redirect";
54
			return "redirect";
56
		} else {
55
		} else {
57
			addActionError("Either email or password is wrong.");
56
			addActionError("Either email or password is wrong.");
58
			return "login";
57
			return "login";
Line 103... Line 102...
103
			log.error("Wrong username or password.");
102
			log.error("Wrong username or password.");
104
			return false;
103
			return false;
105
		}
104
		}
106
	}
105
	}
107
 
106
 
108
	String getUrl() {
107
	public String getUrl() {
109
		return this.redirectUrl;
108
		return this.redirectUrl;
110
	}
109
	}
111
 
110
 
112
	public String getLoginHeaderSnippet() {
111
	public String getLoginHeaderSnippet() {
113
		return htmlSnippets.get("LOGIN_HEADER");
112
		return htmlSnippets.get("LOGIN_HEADER");