public static void makeAssurer(int uid) {
GigiPreparedStatement ps1 = DatabaseConnection.getInstance().prepare("INSERT INTO `cats_passed` SET `user_id`=?, `variant_id`=?");
ps1.setInt(1, uid);
- ps1.setInt(2, 0);
+ ps1.setInt(2, 1);
ps1.execute();
GigiPreparedStatement ps2 = DatabaseConnection.getInstance().prepare("INSERT INTO `notary` SET `from`=?, `to`=?, points='100'");
ps2.execute();
}
- static String stripCookie(String headerField) {
+ protected static String stripCookie(String headerField) {
return headerField.substring(0, headerField.indexOf(';'));
}
return (HttpURLConnection) uc;
}
+ public HttpURLConnection get(String cookie, String path) throws IOException {
+ URLConnection uc = new URL("https://" + getServerName() + path).openConnection();
+ uc.addRequestProperty("Cookie", cookie);
+ return (HttpURLConnection) uc;
+ }
+
public static EmailAddress createVerifiedEmail(User u) throws InterruptedException, GigiApiException {
EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld", Locale.ENGLISH);
TestMail testMail = getMailReciever().receive();