Subversion Repositories SmartDukaan

Rev

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

Rev 4453 Rev 4891
Line 9... Line 9...
9
import in.shop2020.model.v1.user.Sex;
9
import in.shop2020.model.v1.user.Sex;
10
import in.shop2020.model.v1.user.TrackLogType;
10
import in.shop2020.model.v1.user.TrackLogType;
11
import in.shop2020.model.v1.user.User;
11
import in.shop2020.model.v1.user.User;
12
import in.shop2020.serving.interceptors.TrackingInterceptor;
12
import in.shop2020.serving.interceptors.TrackingInterceptor;
13
import in.shop2020.serving.utils.DesEncrypter;
13
import in.shop2020.serving.utils.DesEncrypter;
-
 
14
import in.shop2020.serving.utils.Utils;
14
import in.shop2020.thrift.clients.UserClient;
15
import in.shop2020.thrift.clients.UserClient;
15
import in.shop2020.utils.DataLogger;
16
import in.shop2020.utils.DataLogger;
16
 
17
 
17
import java.io.IOException;
18
import java.io.IOException;
18
import java.util.Date;
19
import java.util.Date;
Line 40... Line 41...
40
	
41
	
41
	private static final long serialVersionUID = 1L;
42
	private static final long serialVersionUID = 1L;
42
	private static Logger log = Logger.getLogger(Class.class);
43
	private static Logger log = Logger.getLogger(Class.class);
43
	private DesEncrypter desEncrypter = new DesEncrypter("saholic");
44
	private DesEncrypter desEncrypter = new DesEncrypter("saholic");
44
	
45
	
45
	private String redirectUrl = null;
46
	private String redirectUrl = "/";
46
 
47
 
47
	public RegisterController(){
48
	public RegisterController(){
48
		super();
49
		super();
49
	}
50
	}
50
 
51
 
Line 69... Line 70...
69
    	String email, password;
70
    	String email, password;
70
    	boolean isValid = true;
71
    	boolean isValid = true;
71
    	email = this.request.getParameter("email"); 
72
    	email = this.request.getParameter("email"); 
72
    	password = this.request.getParameter("txtPassword");
73
    	password = this.request.getParameter("txtPassword");
73
    	
74
    	
74
    	if(email == null ){
75
    	if(Utils.isValidEmail(email))	{
75
    		addActionError("Please enter valid email.");
76
    		addActionError("Please enter valid email address.");
76
    		isValid = false;
77
    		isValid = false;
77
        }
78
        }
78
    	if(password == null ){
79
    	if(password == null )	{
79
    		addActionError("Please enter password.");
80
    		addActionError("Please enter password.");
80
    		isValid = false;
81
    		isValid = false;
81
        }
82
        }
82
    	
83
    	
83
    	if(!isValid){
84
    	if(!isValid){