Newer Version Available
UserProfiles Class
Namespace
UserProfiles Methods
The following are methods for UserProfiles. All methods are static.
deletePhoto(communityId, userId)
API Version
35.0
Requires Chatter
No
Signature
public static Void deletePhoto(String communityId, String userId)
Parameters
Return Value
Type: Void
getBannerPhoto(communityId, userId)
API Version
36.0
Requires Chatter
No
Signature
public static ConnectApi.BannerPhoto getBannerPhoto(String communityId, String userId)
Parameters
Return Value
Type: ConnectApi.BannerPhoto
getPhoto(communityId, userId)
API Version
35.0
Available to Guest Users
35.0
Requires Chatter
No
Signature
public static ConnectApi.Photo getPhoto(String communityId, String userId)
Parameters
Return Value
Type: ConnectApi.Photo
getUserProfile(communityId, userId)
API Version
29.0
Requires Chatter
Yes
Signature
public static ConnectApi.UserProfile getUserProfile(String communityId, String userId)
Parameters
Return Value
Type: ConnectApi.UserProfile
setBannerPhoto(communityId, userId, fileId, versionNumber)
API Version
36.0
Requires Chatter
No
Signature
public static ConnectApi.BannerPhoto setBannerPhoto(String communityId, String userId, String fileId, Integer versionNumber)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- ID of the user.
- fileId
- Type: String
- ID of the already uploaded file to use as the user banner. The key prefix must be 069, and the image must be smaller than 8 MB.
- versionNumber
- Type: Integer
- Version number of the file. Specify an existing version number or, to get the latest version, specify null.
Return Value
Type: ConnectApi.BannerPhoto
Usage
Photos are processed asynchronously and may not be visible right away.
setBannerPhoto(communityId, userId, fileUpload)
API Version
36.0
Requires Chatter
No
Signature
public static ConnectApi.BannerPhoto setBannerPhoto(String communityId, String userId, ConnectApi.BinaryInput fileUpload)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- ID of the user.
- fileUpload
- Type: ConnectApi.BinaryInput
- A file to use as the photo. The content type must be usable as an image.
Return Value
Type: ConnectApi.BannerPhoto
Usage
Photos are processed asynchronously and may not be visible right away.
setBannerPhotoWithAttributes(communityId, userId, bannerPhoto)
API Version
36.0
Requires Chatter
No
Signature
public static ConnectApi.BannerPhoto setBannerPhotoWithAttributes(String communityId, String userId, ConnectApi.BannerPhotoInput bannerPhoto)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- ID of the user.
- bannerPhoto
- Type: ConnectApi.BannerPhotoInput
- A ConnectApi.BannerPhotoInput object that specifies the ID and version of the file, and how to crop the file.
Return Value
Type: ConnectApi.BannerPhoto
Usage
Photos are processed asynchronously and may not be visible right away.
setBannerPhotoWithAttributes(communityId, userId, bannerPhoto, fileUpload)
API Version
36.0
Requires Chatter
No
Signature
public static ConnectApi.BannerPhoto setBannerPhotoWithAttributes(String communityId, String userId, ConnectApi.BannerPhotoInput bannerPhoto, ConnectApi.BinaryInput fileUpload)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- ID of the user.
- bannerPhoto
- Type: ConnectApi.BannerPhotoInput
- A ConnectApi.BannerPhotoInput object specifying the cropping parameters.
- fileUpload
- Type: ConnectApi.BinaryInput
- A file to use as the photo. The content type must be usable as an image.
Return Value
Type: ConnectApi.BannerPhoto
Usage
Photos are processed asynchronously and may not be visible right away.
setPhoto(communityId, userId, fileId, versionNumber)
API Version
35.0
Requires Chatter
No
Signature
public static ConnectApi.Photo setPhoto(String communityId, String userId, String fileId, Integer versionNumber)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- The ID for the context user or the keyword me.
- fileId
- Type: String
- ID of a file already uploaded. The file must be an image, and be smaller than 2 GB.
- versionNumber
- Type: Integer
- Version number of the existing file. Specify either an existing version number, or null to get the latest version.
Return Value
Type: ConnectApi.Photo
Usage
Photos are processed asynchronously and may not be visible right away.
setPhoto(communityId, userId, fileUpload)
API Version
35.0
Requires Chatter
No
Signature
public static ConnectApi.Photo setPhoto(String communityId, String userId, ConnectApi.BinaryInput fileUpload)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- The ID for the context user or the keyword me.
- fileUpload
- Type: ConnectApi.BinaryInput
- A file to use as the photo. The content type must be usable as an image.
Return Value
Type: ConnectApi.Photo
Usage
Photos are processed asynchronously and may not be visible right away.
setPhotoWithAttributes(communityId, userId, photo)
API Version
35.0
Requires Chatter
No
Signature
public static ConnectApi.Photo setPhotoWithAttributes(String communityId, String userId, ConnectApi.PhotoInput photo)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- The ID for the context user or the keyword me.
- photo
- Type: ConnectApi.PhotoInput
- A ConnectApi.PhotoInput object specifying the file ID, version number, and cropping parameters.
Return Value
Type: ConnectApi.Photo
Usage
Photos are processed asynchronously and may not be visible right away.
setPhotoWithAttributes(communityId, userId, photo, fileUpload)
API Version
35.0
Requires Chatter
No
Signature
public static ConnectApi.Photo setPhotoWithAttributes(String communityId, String userId, ConnectApi.PhotoInput photo, ConnectApi.BinaryInput fileUpload)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- userId
- Type: String
- The ID for the context user or the keyword me.
- photo
- Type: ConnectApi.PhotoInput
- A ConnectApi.PhotoInput object specifying the cropping parameters.
- fileUpload
- Type: ConnectApi.BinaryInput
- A file to use as the photo. The content type must be usable as an image.
Return Value
Type: ConnectApi.Photo
Usage
Photos are processed asynchronously and may not be visible right away.