Skip to content

Commit

Permalink
Merge pull request #3321 from AtlasOfLivingAustralia/feature/issue3316
Browse files Browse the repository at this point in the history
commit update email check #3316
  • Loading branch information
chrisala authored Sep 9, 2024
2 parents cac51f3 + 68b7d5f commit 9e3cd22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ class AdminController {
String emailAddress = params.emailAddress
def result = authService.getUserForEmailAddress(emailAddress)
Map userDetails
if (result != null && result.userName == emailAddress){
userDetails = [userId: result.userId, emailAddress: result.userName, firstName: result.firstName, lastName: result.lastName]
if (result != null && result.email == emailAddress){
userDetails = [userId: result.userId, emailAddress: result.email, firstName: result.firstName, lastName: result.lastName]
}else{
userDetails = [error: "error", emailAddress: emailAddress]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AdminControllerSpec extends Specification implements ControllerUnitTest<Ad
setup:
String email = "[email protected]"
params.emailAddress = email
Map userDetails = [userId: "12345", userName: email, firstName: "Test", lastName: "Testing"]
Map userDetails = [userId: "12345", userName: "userTest", firstName: "Test", lastName: "Testing", email:email]

when:
controller.searchUserDetails()
Expand Down

0 comments on commit 9e3cd22

Please sign in to comment.