1. Why are you saving userID to different UserRecord than you do with passwords and PINs? You created struct to hold all three pieces of information inside ONE variable
2. Think about what does it mean for UserRecord type to be equal to another UserRecord, before you try to compare the two with equality operator "==".
You could probably start simple with something like this:
1 2 3 4 5 6 7 8 9
if ( file[index].userID == toBeMatched.userID )
{
// If there is a user, check his password and pin
if (file[index].password == toBeMatched.password &&
file[index].PIN == toBeMatched.PIN )
{
matchFound = true;
}
}