3 out of 4 rated this helpful - Rate this topic

userProfile object

[This documentation is preliminary and is subject to change.]

Obsolete. Provides methods that allow a script to request read access to and perform read actions on a user's profile information.

This object is not supported for Metro style apps using JavaScript.

Standards information

There are no standards that apply here.

Members

The userProfile object has these types of members:

Methods

The userProfile object has these methods.

MethodDescription
addReadRequest

Obsolete. Adds an entry to the queue for read requests.

This method is not supported for Metro style apps using JavaScript.

clearRequest

Obsolete. Clears all requests in the read-requests queue to prepare for new profile-information requests.

This method is not supported for Metro style apps using JavaScript.

 

Remarks

As of Windows Internet Explorer 7, this object is obsolete and should not be used.

The script request is queued before reading or writing is performed. This simplifies user experience, because users are prompted only once for profile release permissions for a batch of requests.

Windows Internet Explorer 8 or later. The behavior of the setAttribute method depends on the current document compatibility mode. For more information, see Attribute Differences in Internet Explorer 8.

Examples

This script example runs on the client and uses the userProfile object to read various values from the profile information.


// Queue a request for read access to multiple profile attributes.
navigator.userProfile.addReadRequest("vcard.displayname");
navigator.userProfile.addReadRequest("vcard.gender");
// Request access to the information.
navigator.userProfile.doReadRequest(usage-code, "Acme Corporation");
// Now perform read operations to access the information.
name = navigator.userProfile.getAttribute("vcard.displayname");
gender = navigator.userProfile.getAttribute("vcard.gender");
// The script can now use the 'name' and 'gender' variables
// to personalize content or to send information back to the server.
// Clear the request queue to prepare for later information requests.
navigator.userProfile.clearRequest();

 

 

Build date: 2/14/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ