class UserServiceImpl implements UserService {

	@Override
	public UserDetails getUserByEmailId(final String emailId) throws PacManException {
		User user;
		if (emailId != null) {
			user = userRepository.findByEmailIgnoreCase(emailId);
			return fetchUserDetails(user, emailId);
		} else {
			throw new PacManException("Email Id cannot be empty");
		}
	}

}