File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ export default class SPPeopleSearchService {
203
203
for ( const value of values ) {
204
204
// Only ensure the user if it is not a SharePoint group
205
205
if ( ! value . EntityData || ( value . EntityData && typeof value . EntityData . SPGroupID === "undefined" && value . EntityData . PrincipalType !== "UNVALIDATED_EMAIL_ADDRESS" ) ) {
206
- const id = await this . ensureUser ( value . Key ) ;
206
+ const id = await this . ensureUser ( value . Key , siteUrl || this . context . pageContext . web . absoluteUrl ) ;
207
207
value . LoginName = value . Key ;
208
208
value . Key = id ;
209
209
}
@@ -272,9 +272,10 @@ export default class SPPeopleSearchService {
272
272
* Retrieves the local user ID
273
273
*
274
274
* @param userId
275
+ * @param siteUrl
275
276
*/
276
- private async ensureUser ( userId : string ) : Promise < number > {
277
- const siteUrl = this . context . pageContext . web . absoluteUrl ;
277
+ private async ensureUser ( userId : string , siteUrl : string ) : Promise < number > {
278
+ // const siteUrl = this.context.pageContext.web.absoluteUrl;
278
279
if ( this . cachedLocalUsers && this . cachedLocalUsers [ siteUrl ] ) {
279
280
const users = this . cachedLocalUsers [ siteUrl ] ;
280
281
const userIdx = findIndex ( users , u => u . LoginName === userId ) ;
You can’t perform that action at this time.
0 commit comments