Subversion Repositories SmartDukaan

Rev

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

Rev 37104 Rev 37126
Line 164... Line 164...
164
		user.setPassword(encrypter.encrypt(password));
164
		user.setPassword(encrypter.encrypt(password));
165
		return true;
165
		return true;
166
	}
166
	}
167
 
167
 
168
	@Override
168
	@Override
169
	public void resetPasswordById(int userId, String password) throws ProfitMandiBusinessException {
169
	public String resetPasswordById(int userId, String password) throws ProfitMandiBusinessException {
170
		User user = userRepository.selectById(userId);
170
		User user = userRepository.selectById(userId);
171
		user.setPassword(encrypter.encrypt(password));
171
		String stored = encrypter.encrypt(password);
-
 
172
		user.setPassword(stored);
-
 
173
		return stored;
172
	}
174
	}
173
 
175
 
174
	@Override
176
	@Override
175
	public boolean changePassword(User user, String password) throws ProfitMandiBusinessException {
177
	public boolean changePassword(User user, String password) throws ProfitMandiBusinessException {
176
		authService.resetPassword(user.getEmailId(), password);
178
		authService.resetPassword(user.getEmailId(), password);