WebSecurity.CurrentUserId Property

Gets the ID for the current user.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

static function get CurrentUserId () : int

Property Value

Type: System.Int32
The ID for the current user.

The ID represents the key under which the user information is stored in the provider data store. The same ID is used to identify a user both in the user profile table and in the membership table.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.