WebSecurity.GetUserIdFromPasswordResetToken Method
Returns a user ID from a password reset token.
Namespace: WebMatrix.WebData
Assembly: WebMatrix.WebData (in WebMatrix.WebData.dll)
Syntax
'Declaration
Public Shared Function GetUserIdFromPasswordResetToken ( _
token As String _
) As Integer
'Usage
Dim token As String
Dim returnValue As Integer
returnValue = WebSecurity.GetUserIdFromPasswordResetToken(token)
public static int GetUserIdFromPasswordResetToken(
string token
)
public:
static int GetUserIdFromPasswordResetToken(
String^ token
)
static member GetUserIdFromPasswordResetToken :
token:string -> int
public static function GetUserIdFromPasswordResetToken(
token : String
) : int
Parameters
- token
Type: System.String
The password reset token.
Return Value
Type: System.Int32
The user ID.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | The SimpleMembershipProvider.Initialize(String, NameValueCollection) method was not called. -or- The InitializeDatabaseConnection() method was not called. -or- The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator. |
Remarks
The ID represents the key under which the user profile is stored. The same ID is used to identify a user both in the user profile table and in the membership table.