@Override
	public boolean checkActivated(String user) throws SQLException,
			ClassNotFoundException {
		sqlClass();
		sqlCon();
		if (!customField.isEmpty()) {
			query = "SELECT user_id FROM " + tablePref
					+ "profile_fields_data WHERE pf_" + customField + "='"
					+ user + "'";

			ResultSet rs = SELECT(query);

			if (rs.next()) {
				query = "SELECT * FROM " + tablePref + "users WHERE user_id='"
						+ rs.getInt("user_id") + "' AND user_type = '0'";

				rs = SELECT(query);

				if (rs.next()) {
					closeCon();
					return true;
				} else {
					closeCon();
					return false;
				}
			} else {
				return false;
			}
		} else {

			query = "SELECT * FROM " + tablePref + "users WHERE username='"
					+ user + "' AND user_type = '0'";
			ResultSet rs = SELECT(query);

			if (rs.next()) {
				closeCon();
				return true;
			} else {
				closeCon();
				return false;
			}
		}
	}