You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
Please specify what version of the library you are using: [ 3.0.2]
Expected / Desired Behavior / Question
I want to get the profile picture of a user in my angular2 app.
I use the following code: return new Promise((resolve, reject) => { pnp.sp.profiles.getPropertiesFor(AccountName).then(res => { const pictureUrl = res.PictureUrl; resolve(pictureUrl); });
I get the typescript error that any[] dont have the property PictureUrl. When i change the typing in node_modules\sp-pnp-js\lib\sharepoint\userprofiles.d.ts from getPropertiesFor(loginName: string): Promise<any[]>;
to getPropertiesFor(loginName: string): Promise<any>;
the code runs as it should.
Im reporting this because im using continues integration from visual studio online and i cant change the code in there for the build process and it runs on this error.
Maybe its my fault and i should use the function differently. But since the code is working with my change of the typings i hope you could update it or show me the correct way to use the function.
Kind regards,
Alex
The text was updated successfully, but these errors were encountered:
Hi @doxic012 - perhaps you meant to post this in the other repo? If you could open an issue there with details that would help us track things. Thanks!
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 3.0.2]
Expected / Desired Behavior / Question
I want to get the profile picture of a user in my angular2 app.
I use the following code:
return new Promise((resolve, reject) => { pnp.sp.profiles.getPropertiesFor(AccountName).then(res => { const pictureUrl = res.PictureUrl; resolve(pictureUrl); });
I get the typescript error that any[] dont have the property PictureUrl. When i change the typing in node_modules\sp-pnp-js\lib\sharepoint\userprofiles.d.ts from
getPropertiesFor(loginName: string): Promise<any[]>;
to
getPropertiesFor(loginName: string): Promise<any>;
the code runs as it should.
Im reporting this because im using continues integration from visual studio online and i cant change the code in there for the build process and it runs on this error.
Maybe its my fault and i should use the function differently. But since the code is working with my change of the typings i hope you could update it or show me the correct way to use the function.
Kind regards,
Alex
The text was updated successfully, but these errors were encountered: