public boolean saveIpbUser(String user) throws ClassNotFoundException,
			SQLException {
		sqlClass();
		sqlCon();
		if (!customField.isEmpty()) {
			query = "SELECT member_id FROM " + tablePref
					+ "pfields_content WHERE field_" + customField + " ='"
					+ user + "'";
			ResultSet rs = SELECT(query);
			if (rs.next()) {
				query = "UPDATE " + tablePref
						+ "members SET member_group_id ='3' WHERE member_id='"
						+ rs.getInt("member_id") + "'";
				UPDATE(query);
				query = "SELECT * FROM " + tablePref
						+ "members WHERE member_group_id='3' AND member_id="
						+ rs.getInt("member_id");
				rs = SELECT(query);

				if (rs.next()) {
					plugin.sendInfo(ForumAA.server.getPlayer(user),
							"Your account has been activated.");
					closeCon();
					return true;
				} else {
					plugin.sendError(ForumAA.server.getPlayer(user),
							"Your account has not been activated");
					closeCon();
					return false;
				}

			} else {
				plugin.sendError(ForumAA.server.getPlayer(user),
						"Couldn't find your username");
				closeCon();
				return false;
			}
		} else {
			query = "UPDATE "
					+ tablePref
					+ "members SET member_group_id ='3' WHERE members_display_name='"
					+ user + "'";
			UPDATE(query);
			query = "SELECT * FROM " + tablePref
					+ "members WHERE members_display_name='" + user
					+ "' AND member_group_id='3'";
			ResultSet rs = SELECT(query);
			if (rs.next()) {
				plugin.sendInfo(ForumAA.server.getPlayer(user),
						"Your account has been activated.");
				closeCon();
				return true;

			} else {
				plugin.sendError(ForumAA.server.getPlayer(user),
						"Your account has not been activated");
				closeCon();
				return false;
			}
		}
	}