Skip to content

Commit 4b268cb

Browse files
authored
Merge pull request #2908 from TechnologyEnhancedLearning/Develop/Fix/TD-4946-email-address-displayed-twice
TD-4946-Name property initialized from UserAccount entity
2 parents 3098eaa + 0b93535 commit 4b268cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Centre/Administrator/SearchableAdminViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ ReturnPageQuery returnPageQuery
1717
)
1818
{
1919
Id = admin.AdminAccount.Id;
20-
Name = admin.SearchableName;
20+
Name = string.IsNullOrWhiteSpace(admin.UserAccount.FirstName) ? admin.UserAccount.LastName :
21+
$"{admin.UserAccount.LastName}, {admin.UserAccount.FirstName}";
2122
CategoryName = admin.AdminAccount.CategoryName ?? "All";
2223
EmailAddress = admin.EmailForCentreNotifications;
2324
IsLocked = admin.UserAccount.FailedLoginCount >= AuthHelper.FailedLoginThreshold;

0 commit comments

Comments
 (0)