Skip to content
Snippets Groups Projects
Commit 09474f64 authored by Jochem de Goede's avatar Jochem de Goede
Browse files

Update SAML first year attach logic

parent dbb7c184
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,7 @@ public class SAMLUserDetailsServiceImpl implements SAMLUserDetailsService { ...@@ -63,7 +63,7 @@ public class SAMLUserDetailsServiceImpl implements SAMLUserDetailsService {
private void AttachUserToFirstYearStudent(User user) { private void AttachUserToFirstYearStudent(User user) {
FirstYearStudent firstYearStudent = firstYearStudentRepository.findByNetId(user.getUsername()); FirstYearStudent firstYearStudent = firstYearStudentRepository.findByNetId(user.getUsername());
if (firstYearStudent != null) { if (firstYearStudent != null && firstYearStudent.getUser() == null) {
firstYearStudent.setUser(user); firstYearStudent.setUser(user);
firstYearStudentRepository.save(firstYearStudent); firstYearStudentRepository.save(firstYearStudent);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment