Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue where the avatar url was not being populated in the Users module #5630

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public UserBasicDto(UserInfo user)
this.IsSuperUser = user.IsSuperUser;
this.IsAdmin = user.Roles.Contains(this.PortalSettings.AdministratorRoleName);
this.AvatarUrl = Utilities.GetProfileAvatar(this.UserId);
}

public void PopulateAvatarUrl()
{
this.AvatarUrl = Utilities.GetProfileAvatar(this.UserId);
}

[DataMember(Name = "avatar")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@ private IEnumerable<UserBasicDto> GetUsers(GetUsersContract usersContract, bool?
hasAgreedToTerms,
requestsRemoval));

foreach (var user in records)
{
user.PopulateAvatarUrl();
}

totalRecords = records.Count == 0 ? 0 : records[0].TotalCount;
return records;
}
Expand Down