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

Class UserInfo

The UserInfo class provides Business Layer model for Users.

Inheritance
System.Object
BaseEntityInfo
UserInfo
Implements
IPropertyAccess
IUserInfo
Inherited Members
BaseEntityInfo.CreatedByUserID
BaseEntityInfo.CreatedOnDate
BaseEntityInfo.LastModifiedByUserID
BaseEntityInfo.LastModifiedOnDate
BaseEntityInfo.CreatedByUser(Int32)
BaseEntityInfo.LastModifiedByUser(Int32)
BaseEntityInfo.FillInternal(IDataReader)
BaseEntityInfo.CloneBaseProperties(BaseEntityInfo, BaseEntityInfo)
Namespace: DotNetNuke.Entities.Users
Assembly: DotNetNuke.dll
Syntax
public class UserInfo : BaseEntityInfo, IPropertyAccess, IUserInfo

Constructors

| Improve this Doc View Source

UserInfo()

Initializes a new instance of the UserInfo class.

Declaration
public UserInfo()

Properties

| Improve this Doc View Source

AffiliateID

Gets or sets the AffiliateId for this user.

Declaration
public int AffiliateID { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Cacheability

Gets the cache level for property access.

Declaration
public CacheLevel Cacheability { get; }
Property Value
Type Description
CacheLevel
| Improve this Doc View Source

DisplayName

Gets or sets the Display Name.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Email

Gets or sets the Email Address.

Declaration
public string Email { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

FirstName

Gets or sets the First Name.

Declaration
public string FirstName { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

HasAgreedToTerms

Gets or sets a value indicating whether the user has agreed to the terms and conditions.

Declaration
public bool HasAgreedToTerms { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

HasAgreedToTermsOn

Gets or sets when the user last agreed to the terms and conditions.

Declaration
public DateTime HasAgreedToTermsOn { get; set; }
Property Value
Type Description
DateTime
| Improve this Doc View Source

IsAdmin

Gets a value indicating whether the user is in the portal's administrators role.

Declaration
public bool IsAdmin { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsDeleted

Gets or sets a value indicating whether the User is deleted.

Declaration
public bool IsDeleted { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsSuperUser

Gets or sets a value indicating whether the User is a SuperUser.

Declaration
public bool IsSuperUser { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LastIPAddress

Gets or sets the Last IP address used by user.

Declaration
public string LastIPAddress { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LastName

Gets or sets the Last Name.

Declaration
public string LastName { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Membership

Gets or sets the Membership object.

Declaration
public UserMembership Membership { get; set; }
Property Value
Type Description
UserMembership
| Improve this Doc View Source

PasswordResetExpiration

Gets or sets the datetime that the PasswordResetToken is valid.

Declaration
public DateTime PasswordResetExpiration { get; set; }
Property Value
Type Description
DateTime
| Improve this Doc View Source

PasswordResetToken

Gets or sets the token created for resetting passwords.

Declaration
public Guid PasswordResetToken { get; set; }
Property Value
Type Description
Guid
| Improve this Doc View Source

PortalID

Gets or sets the PortalId.

Declaration
public int PortalID { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Profile

Gets or sets the Profile Object.

Declaration
public UserProfile Profile { get; set; }
Property Value
Type Description
UserProfile
| Improve this Doc View Source

RequestsRemoval

Gets or sets a value indicating whether the user has requested they be removed from the site.

Declaration
public bool RequestsRemoval { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Roles

The UserInfo class provides Business Layer model for Users.

Declaration
public string[] Roles { get; set; }
Property Value
Type Description
System.String[]
| Improve this Doc View Source

Social

Gets and sets the Social property.

Declaration
public UserSocial Social { get; }
Property Value
Type Description
UserSocial
| Improve this Doc View Source

UserID

Gets or sets the User Id.

Declaration
public int UserID { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Username

Gets or sets the User Name.

Declaration
public string Username { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

VanityUrl

The UserInfo class provides Business Layer model for Users.

Declaration
public string VanityUrl { get; set; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

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

Property access, initially provided for TokenReplace.

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

Name of the Property.

System.String format

format string.

CultureInfo formatProvider

format provider for numbers, dates, currencies.

UserInfo accessingUser

userinfo of the user, who queries the data (used to determine permissions).

Scope currentScope

requested maximum access level, might be restricted due to user level.

System.Boolean propertyNotFound

out: flag, if property could be retrieved.

Returns
Type Description
System.String

current value of the property for this userinfo object.

| Improve this Doc View Source

IsInRole(String)

IsInRole determines whether the user is in the role passed.

Declaration
public bool IsInRole(string role)
Parameters
Type Name Description
System.String role

The role to check.

Returns
Type Description
System.Boolean

A Boolean indicating success or failure.

| Improve this Doc View Source

LocalTime()

Gets current time in User's timezone.

Declaration
public DateTime LocalTime()
Returns
Type Description
DateTime

The time in the user's (or portal's) preferred time zone.

| Improve this Doc View Source

LocalTime(DateTime)

Convert utc time in User's timezone.

Declaration
public DateTime LocalTime(DateTime utcTime)
Parameters
Type Name Description
DateTime utcTime

Utc time to convert.

Returns
Type Description
DateTime

The time in the user's (or portal's) preferred time zone.

| Improve this Doc View Source

UpdateDisplayName(String)

UpdateDisplayName updates the displayname to the format provided.

Declaration
public void UpdateDisplayName(string format)
Parameters
Type Name Description
System.String format

The format to use.

Implements

IPropertyAccess
IUserInfo

Extension Methods

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