Subversion Repositories SmartDukaan

Rev

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

Rev 24099 Rev 24142
Line 142... Line 142...
142
 
142
 
143
 
143
 
144
	@Override
144
	@Override
145
	public User authenticate(String emailMobile, String password) throws ProfitMandiBusinessException {
145
	public User authenticate(String emailMobile, String password) throws ProfitMandiBusinessException {
146
		User user = userRepository.selectByEmailIdOrMobileNumber(emailMobile);
146
		User user = userRepository.selectByEmailIdOrMobileNumber(emailMobile);
147
		com.spice.profitmandi.dao.entity.user.User userUser = userUserRepository.selectByEmailId(user.getEmailId());
-
 
148
		if(!user.getPassword().equals(encrypter.decrypt(password))) {
147
		if(!user.getPassword().equals(encrypter.decrypt(password))) {
149
			throw new ProfitMandiBusinessException("Username Password", emailMobile, "Invalid Username or Password");
148
			throw new ProfitMandiBusinessException("Username Password", emailMobile, "Invalid Username or Password");
150
		}
149
		}
151
		return user;
150
		return user;
152
	}
151
	}