public Result register(User u)
	{
		if (!validate.isText(u.getUserFname(), true))
			errors = errors + "First name is not valid.<br>";
		if (!validate.isText(u.getUserFname(), true))
			errors = errors + "Last name is not valid.<br>";
		if (!validate.isEmailAddress(u.getUserEmail(), true))
			errors = errors + "Email is not valid<br>";
		if (userDAO.daoEmailExist(u.getUserEmail()).size() >= 1)
			errors = errors + "Email is used in our system.<br>";
		if (u.getUserPassword().length() < 8 || u.getUserPassword().length() > 20)
			errors = errors + "Password must be between 8 & 20 characters.<br>";
		
		if (errors.length() == 0) {
			u.setUserDate(new Timestamp(new Date().getTime()));
			u = userDAO.insert(u);
			result.setOperation("register");
			result.setMessage("ok");
			result.setFlagId("user-id");
			result.setId(u.getUserId());			
		}
		else
		{
			result.setOperation("register");
			result.setMessage("failed");
			result.setFlagText("form-error");
			result.setText(errors);
		}
		
		return result;
	}