Compartir a través de


Manager.HasProfile

Manager.HasProfile

The HasProfile method indicates whether a user has core profile data already in a cookie.

Syntax

Function Manager.HasProfile([ProfileName]) As Boolean

Parameters

  • ProfileName
    Optional string representing the profile to check. The only valid value for this parameter is "core". Using the value "core" or omitting the parameter will cause the method to check for the presence of the core profile.

Return values

The HasProfile method returns a Boolean value. The value is True if Profilename exists in this user's profile; otherwise, the value is False.

Example

The following Microsoft Visual Basic Scripting Edition (VBScript) code snippet uses the HasProfile method to determine if a valid core profile exists. If so, the user's country and profile version are displayed.

...
Dim oMgr
Set oMgr = Server.CreateObject("Passport.Manager")

If oMgr.HasProfile("core") Then
  Response.Write ("<br>Your country is: " & oMgr.Profile("country"))
  Response.Write ("<br>profileVersion: " & oMgr("profileVersion"))
Else
  Response.Write ("<br>No core profile exists.")
End if
...

See Also

Passport Manager Object