Subversion Repositories SmartDukaan

Rev

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

Rev 2949 Rev 3126
Line 2... Line 2...
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.serving.controllers;
4
package in.shop2020.serving.controllers;
5
import in.shop2020.model.v1.user.UserContextException;
5
import in.shop2020.model.v1.user.UserContextException;
6
import in.shop2020.serving.utils.DesEncrypter;
6
import in.shop2020.serving.utils.DesEncrypter;
7
import in.shop2020.thrift.clients.UserContextServiceClient;
7
import in.shop2020.thrift.clients.UserClient;
8
 
8
 
9
import java.io.UnsupportedEncodingException;
9
import java.io.UnsupportedEncodingException;
10
 
10
 
11
import org.apache.log4j.Logger;
11
import org.apache.log4j.Logger;
12
import org.apache.struts2.convention.annotation.InterceptorRef;
12
import org.apache.struts2.convention.annotation.InterceptorRef;
Line 75... Line 75...
75
    
75
    
76
	public boolean changePassword(long userId, String email, String oldPassword, String newPassword) {
76
	public boolean changePassword(long userId, String email, String oldPassword, String newPassword) {
77
 
77
 
78
		
78
		
79
		try {
79
		try {
80
			UserContextServiceClient userContextServiceClient = new UserContextServiceClient();
80
			UserClient userContextServiceClient = new UserClient();
81
			in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
81
			in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
82
 
82
 
83
			return userClient.updatePassword(userId,oldPassword, newPassword);
83
			return userClient.updatePassword(userId,oldPassword, newPassword);
84
		} catch (UserContextException e) {
84
		} catch (UserContextException e) {
85
			log.error("Unable to update password", e);
85
			log.error("Unable to update password", e);