Skip to content
Snippets Groups Projects
Commit 6c5f2dca authored by Seb Barnard's avatar Seb Barnard :speech_balloon:
Browse files

Fixed issue caused by not saving 2fa method before user

parent bbaaf1e7
No related branches found
No related tags found
4 merge requests!56tags will be saved to userFavTags table (needs user ID of current logged in user),!22Branch Update,!19created signUp page and form that sends data to controller,!17Removal of "AUTO_INCREMENT" on AdminTypes id field since there will only ever...
......@@ -23,11 +23,15 @@ public class registerUserServiceStatic implements registerUserService{
twoFactorMethods.setTwoFactorMethodId(ID);
twoFactorMethods.setTwoFactorMethodName("None");
twoFactorMethodsRepo.save(twoFactorMethods);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
Users newUser = new Users(accountDTO.getName(), accountDTO.getSurname(), accountDTO.getEmail(), accountDTO.getPassword(),
"", "",
LocalDateTime.now().format(formatter), twoFactorMethods);
Users users = usersRepo.save(newUser);
usersRepo.save(newUser);
System.out.println(usersRepo.findById(newUser.getUserId()));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment