Skip to content

Commit

Permalink
fixed some login and register stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dorrin-sot committed Feb 5, 2021
1 parent a4cf1f1 commit 994f98b
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/com/plato/Controller/Menus/RegisterFormController.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,26 @@ public void signUp (ActionEvent actionEvent) {
phoneNumError.setText(e.getMessage());
}
return;
} catch (MainController.SuccessfulOperationException e) {
// (Class accType, String pfp, String firstName, String lastName, String username, String password, String email, String phoneNum, double money)
try {
dataOutputStream.writeUTF(
"register_" + (Admin.adminHasBeenCreated() ? Gamer.class : Admin.class).getSimpleName() + "_" +
pfp.getImage().getUrl() + "_" +
firstName.getText() + "_" +
lastName.getText() + "_" +
username + "_" +
password + "_" +
email.getText() + "_" +
phoneNum.getText() + "_" +
(coinMenu.getText().equalsIgnoreCase("coins") ? 0 : coinMenu.getText())
);
dataOutputStream.flush();
} catch (IOException ioException) {
ioException.printStackTrace();
}
} catch (MainController.SuccessfulOperationException e) {}

// (Class accType, String pfp, String firstName, String lastName, String username, String password, String email, String phoneNum, double money)
try {
dataOutputStream.writeUTF(
"register_" + (Admin.adminHasBeenCreated() ? Gamer.class : Admin.class).getSimpleName() + "_" +
pfp.getImage().getUrl() + "_" +
firstName.getText() + "_" +
lastName.getText() + "_" +
username + "_" +
password + "_" +
email.getText() + "_" +
phoneNum.getText() + "_" +
(coinMenu.getText().equalsIgnoreCase("coins") ? 0 : coinMenu.getText())
);
dataOutputStream.flush();
} catch (IOException ioException) {
ioException.printStackTrace();
}

stage.close();
RegisterMenuController.getStage().close();

Expand Down

0 comments on commit 994f98b

Please sign in to comment.