Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


Returns true if the specified role is assigned to the current user.

**Returns**

  • **roleName** – The name of role. This can be a standard or custom role (not provided by Optimizely <<product-name>>).

**Parameters**



Indicates whether or not the specified role is assigned to the current user.

### IsUserInRole(string)

## Methods



Gets the current website being browsed by the user.

### WebsiteDto



Gets the default warehouse for the current ship-to or bill-to customer. If a default warehouse can not be found, the default warehouse for the application is returned.

### WarehouseDto



Gets the current user.

### UserProfile



Gets the current ship-to customer.

### ShipTo



Gets the remembered user profile. This will only return an object if the current user chose to have his or her account remembered when he or she logged into the Storefront.

### RememberedUserProfile



Gets the current PickUp warehouse. Used only when FulfillmentMethod is PickUp.

### PickUpWarehouseDto



Gets the current persona applied to the current user. This will only return an object if the current user has a persona applied.

### PersonaDto



Gets the microsite identifier for the current microsite. This only applies if the current user is browsing a microsite.

### Microsite



Gets the current language.

### LanguageDto



Gets the current fulfillment method. This can be Ship or PickUp. If the **Enable Warehouse Pickup** setting is **No**, it will always be Ship.

### FulfillmentMethod

DeviceType DeviceType { get; }

Gets the current device type. This can be one of Desktop, Tablet, or Phone.

### DeviceType



Gets the current currency.

### CurrencyDto



Gets the current bill-to customer.

### BillTo

## Properties

The context for the current Storefront session. The context includes objects like the current bill-to and ship-to customers, language, currency, website, and user. To obtain the current site context, you should use SiteContext.Current. This object is created new for each HTTP request.