asp.net.ph

Skip Navigation Links

userProfile Object

Language References


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

Remarks

Note that the request is queued up before the reading or writing action is performed. This simplifies the user experience because users are only prompted for profile release permissions once for a batch of requests.

Members

userProfile Members

Example

The following is an example of a script that can be run on the client to read various values from the profile information.

// Queue up a request for read access to multiple profile attributes.
navigator.userProfile.addReadRequest ( "vcard.displayname" );
navigator.userProfile.addReadRequest ( "vcard.gender" );

// Request access to this 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.
// This is to support getting back to a clean slate by clearing the request queue.
navigator.userProfile.clearRequest ( );


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note