Closed azend closed 7 months ago
We should write a test case for this model function before merge but I don't have enough familiarity with Laravel at the moment to competently make that adjustment. Collabs welcome.
$ ./vendor/bin/phpunit
PHPUnit 9.6.9 by Sebastian Bergmann and contributors.
................................................................. 65 / 79 ( 82%)
.............. 79 / 79 (100%)
Time: 00:07.709, Memory: 64.50 MB
OK (79 tests, 166 assertions)
Updated to use the null coalescing operator as @IanEdington suggested. Looks much cleaner!
% docker-compose exec app ./vendor/bin/phpunit
PHPUnit 9.6.9 by Sebastian Bergmann and contributors.
................................................................. 65 / 79 ( 82%)
.............. 79 / 79 (100%)
Time: 00:07.862, Memory: 64.50 MB
OK (79 tests, 166 assertions)
This PR fixes a display bug most commonly found in new member application emails where the applying member's display name is presented.
In certain situations where either a preferred first or last name are optionally provided, the application expects both preferred first name and last name to be present. This creates a display error where only the applicant's preferred first name is rendered as the full name unless the applicant's preferred last name is also available.
Changes in this PR check and use both preferred first name and last name if available independently but otherwise default to legal first name and last name.