aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/juick/server/UserQueries.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/UserQueries.java b/src/main/java/com/juick/server/UserQueries.java
index 95944ce0..7e3a212b 100644
--- a/src/main/java/com/juick/server/UserQueries.java
+++ b/src/main/java/com/juick/server/UserQueries.java
@@ -27,6 +27,7 @@ import java.sql.Statement;
import java.util.ArrayList;
import java.util.Random;
import java.util.UUID;
+import java.util.logging.Logger;
/**
*
@@ -36,6 +37,8 @@ public class UserQueries {
static final String ABCDEF = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ private static Logger logger = Logger.getLogger(UserQueries.class.getName());
+
public static String getSignUpHashByJID(Connection sql, String jid) {
String hash = SQLHelpers.getString(sql, "SELECT loginhash FROM jids WHERE jid=? AND user_id IS NULL", jid);
@@ -583,7 +586,7 @@ public class UserQueries {
PreparedStatement stmt =
sql.prepareStatement("INSERT INTO twitter(user_id,access_token,access_token_secret,uname) " +
"VALUES (?,?,?,?)" +
- " ON DUPLICATE KEY UPDATE access_token=?,access_token_secret=?,uname=?;");
+ " ON DUPLICATE KEY UPDATE access_token=?,access_token_secret=?,uname=?");
stmt.setInt(1, user.UID);
stmt.setString(2, accessToken);
stmt.setString(3, accessTokenSecret);
@@ -599,7 +602,7 @@ public class UserQueries {
return stmt2.execute();
}
} catch (SQLException e) {
-
+ logger.throwing(UserQueries.class.getName(), "linkTwitterAccount", e);
}
return false;
}