Skip to content

Commit

Permalink
Reverse commit: Refer to the commit about the revesere commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Apr 16, 2026
1 parent 9381392 commit 94ca5ac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected void authTokenisSet() {
loginButton.setManaged(false);
profileButton.setVisible(true);
profileButton.setManaged(true);
profileButton.setText(authToken.getCurrentUser().getDisplayName().substring(0,2));
profileButton.setText(authToken.getCurrentUser().getUsername().substring(0,2));
} else {
loginButton.setVisible(true);
loginButton.setManaged(true);
Expand All @@ -39,7 +39,7 @@ private void handleFrontSearch(ActionEvent event){
return;
}

LoaderScene.LoadScene("availableOrganization", event, null, query, authToken);
LoaderScene.LoadScene("available_organizations", event, null, query, authToken);
}

@FXML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ public boolean registerUser(User user) {
"""
INSERT INTO User (
UUID_User,
user_displayname,
user_name,
user_email,
user_password,
role
)
VALUES (?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?)
""";

String settingsSql =
Expand All @@ -63,11 +62,10 @@ INSERT INTO Settings (
try (PreparedStatement psUser = conn.prepareStatement(userSql)) {

psUser.setString(1, user.getId().toString());
psUser.setString(2, user.getDisplayName()); // display name
psUser.setString(3, user.getUsername()); // username
psUser.setString(4, user.getEmail());
psUser.setString(5, user.getPasswordHash());
psUser.setString(6, user.getRole().name());
psUser.setString(2, user.getUsername()); // username
psUser.setString(3, user.getEmail());
psUser.setString(4, user.getPasswordHash());
psUser.setString(5, user.getRole().name());

psUserRows = psUser.executeUpdate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public DonationRegistry getDonationFromDB() {
SELECT
d.UUID_Donations, d.amount, d.isAnonymous, d.date, d.charity_id, d.user_id,
c.UUID_charities, c.org_number, c.pre_approved, c.status,
u.UUID_User, u.user_displayname, u.user_name, u.user_email, u.user_password, u.role
u.UUID_User, u.user_name, u.user_email, u.user_password, u.role
FROM Donations d
INNER JOIN Charities c ON d.charity_id = c.UUID_charities
INNER JOIN User u ON d.user_id = u.UUID_user
Expand All @@ -79,7 +79,6 @@ public DonationRegistry getDonationFromDB() {
User user =
new User(
rs.getString("UUID_User"),
rs.getString("user_displayname"),
rs.getString("user_name"),
rs.getString("user_email"),
rs.getString("user_password"),
Expand Down

0 comments on commit 94ca5ac

Please sign in to comment.