Class ProfilePropertyAccess
Provides access to profile properties.
Inheritance
Implements
Namespace: DotNetNuke.Entities.Users
Assembly: DotNetNuke.dll
Syntax
public class ProfilePropertyAccess : object, IPropertyAccess
Constructors
| Improve this Doc View SourceProfilePropertyAccess(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 SourceCacheability
Gets the cache level for property access.
Declaration
public CacheLevel Cacheability { get; }
Property Value
Type | Description |
---|---|
CacheLevel |
Methods
| Improve this Doc View SourceCheckAccessLevel(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 |
|
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 |
|
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. |
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 |
CultureInfo | formatProvider | The format provider (e.g. |
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. |
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 |
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. |