@SuppressWarnings("unchecked")
	@Override
	@Transactional(readOnly = true)
	public CUser findByName(String name) {
		 List<CUser> users=null;
		try{
		Query query=getFactory().getCurrentSession().createQuery("from cuser where emailID = :email");
		query.setParameter("email", name);
		 users = query.list();
		}catch(Exception e){
			e.printStackTrace();
		}
		
		if (users.isEmpty()) {
			return null;
		}

		return users.iterator().next();
	}