IUserProfiles.SetActiveProfile Method

Changes the active user profile.
Function SetActiveProfile( _ 
ByVal profileID As String, _ 
ByVal password As String
) As IUserProfile
This language is not supported or no code example is available.
IUserProfile SetActiveProfile( 
string profileID
string password 
)
This language is not supported or no code example is available.

Parameters

profileID
string

The ID of the profile to be activated.

password
string

The password for the profileID. May be null reference (Nothing in Visual Basic) or an empty string, in which case the method will try to use the saved password, if any.

Return Value

IUserProfile

The newly activated profile.

Exception type Condition

ArgumentException

The profileID:

  • doesn't exist or
  • is null reference (Nothing in Visual Basic)or
  • is invalid

Or the password is invalid.

InvalidOperationException

Another problem occurred.

Remarks
 

Before the profile is switched, the password must be validated. The authentication will pass if one of the following is true: 
- the password is correct or 
- the password is null reference (Nothing in Visual Basic) or an empty string and the password is not required, for example it was already saved.

This method updates the ActiveProfile property.

There's no need to call IEstimate.CheckAndRepaint, the UI will be updated automatically.

Version
 
Available since QDV 7.23.1049.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition