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

Replacing hard coded user information list value with instance that should resolve regardless of the language of the site #1097

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion src/lib/PnP.Framework/Extensions/ListExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,9 @@ public static void EnableModernAudienceTargeting(this List list)
Field firstField = list.Fields.AddFieldAsXml(firstModernTargetingFieldXml, false, addOptions);
list.Context.Load(firstField);

var userInformationList = web.Lists.GetByTitle("User Information List");
web.EnsureProperties(w => w.SiteUserInfoList);

var userInformationList = web.SiteUserInfoList;
list.Context.Load(userInformationList, l => l.Id);
list.Context.ExecuteQueryRetry();

Expand Down
Loading