• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class ProfilePropertyAccess

Provides access to profile properties.

Inheritance
System.Object
ProfilePropertyAccess
Implements
IPropertyAccess
Namespace: DotNetNuke.Entities.Users
Assembly: DotNetNuke.dll
Syntax
public class ProfilePropertyAccess : object, IPropertyAccess

Constructors

| Improve this Doc View Source

ProfilePropertyAccess(UserInfo)

Initializes a new instance of the ProfilePropertyAccess class for a user.

Declaration
public ProfilePropertyAccess(UserInfo user)
Parameters
Type Name Description
UserInfo user

The user to use for these properties, UserInfo.

Properties

| Improve this Doc View Source

Cacheability

Gets the cache level for property access.

Declaration
public CacheLevel Cacheability { get; }
Property Value
Type Description
CacheLevel

Methods

| Improve this Doc View Source

CheckAccessLevel(IPortalSettings, ProfilePropertyDefinition, UserInfo, UserInfo)

Checks whether profile property is accessible.

Declaration
public static bool CheckAccessLevel(IPortalSettings portalSettings, ProfilePropertyDefinition property, UserInfo accessingUser, UserInfo targetUser)
Parameters
Type Name Description
IPortalSettings portalSettings

The portal settings.

ProfilePropertyDefinition property

The property.

UserInfo accessingUser

The accessing user.

UserInfo targetUser

The target user.

Returns
Type Description
System.Boolean

true if property accessible, otherwise false.

| Improve this Doc View Source

CheckAccessLevel(PortalSettings, ProfilePropertyDefinition, UserInfo, UserInfo)

Checks whether profile property is accessible.

Declaration
public static bool CheckAccessLevel(PortalSettings portalSettings, ProfilePropertyDefinition property, UserInfo accessingUser, UserInfo targetUser)
Parameters
Type Name Description
PortalSettings portalSettings

The portal settings.

ProfilePropertyDefinition property

The property.

UserInfo accessingUser

The accessing user.

UserInfo targetUser

The target user.

Returns
Type Description
System.Boolean

true if property accessible, otherwise false.

| Improve this Doc View Source

DisplayDataType(ProfilePropertyDefinition)

Gets the date type for a profile property definition.

Declaration
public static string DisplayDataType(ProfilePropertyDefinition definition)
Parameters
Type Name Description
ProfilePropertyDefinition definition

The ProfilePropertyDefinition to check.

Returns
Type Description
System.String

A string representing the data type such as: truefalse, date, datetime, integer, page, image or richtext.

| Improve this Doc View Source

GetProperty(String, String, CultureInfo, UserInfo, Scope, ref Boolean)

Gets a property.

Declaration
public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, ref bool propertyNotFound)
Parameters
Type Name Description
System.String propertyName

The property name to get.

System.String format

The format string to format the property with, or null to use the default format.

CultureInfo formatProvider

The format provider (e.g. ) to use.

UserInfo accessingUser

The user this property belongs to, UserInfo.

Scope currentScope
System.Boolean propertyNotFound

An out parameter that indicates if the property was not found.

Returns
Type Description
System.String

A string with the value of the property.

| Improve this Doc View Source

GetRichValue(ProfilePropertyDefinition, String, CultureInfo)

Gets a human readable string representing some complex profile properties.

Declaration
public static string GetRichValue(ProfilePropertyDefinition property, string formatString, CultureInfo formatProvider)
Parameters
Type Name Description
ProfilePropertyDefinition property

The ProfilePropertyDefinition to get the string from.

System.String formatString

An optional format string.

CultureInfo formatProvider

An optional format provider to use.

Returns
Type Description
System.String

For booleans, will return localized values for True or False, For dates, it will return a human formatted date for the requested culture, For pages, it will return an html link to the page, etc.

Implements

IPropertyAccess

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS