Class User
Represents a backoffice user
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class User : Entity, IUser, IMembershipUser, IAggregateRoot, IDeletableEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty, IProfile
Constructors
User()
Constructor for creating a new/empty user
Declaration
User(Int32, String, String, String, String, IEnumerable<IReadOnlyUserGroup>, Int32[], Int32[])
Constructor for creating a new User instance for an existing user
Declaration
public User(int id, string name, string email, string username, string rawPasswordValue, IEnumerable<IReadOnlyUserGroup> userGroups, int[] startContentIds, int[] startMediaIds)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.String |
name |
|
System.String |
email |
|
System.String |
username |
|
System.String |
rawPasswordValue |
|
System.Collections.Generic.IEnumerable<IReadOnlyUserGroup> |
userGroups |
|
System.Int32[] |
startContentIds |
|
System.Int32[] |
startMediaIds |
|
User(String, String, String, String)
Constructor for creating a new/empty user
Declaration
public User(string name, string email, string username, string rawPasswordValue)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
email |
|
System.String |
username |
|
System.String |
rawPasswordValue |
|
Properties
AllowedSections
Declaration
public IEnumerable<string> AllowedSections { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Avatar
Declaration
[DataMember]
public string Avatar { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
[IgnoreDataMember]
public string Comments { get; set; }
Property Value
Type |
Description |
System.String |
|
Email
Declaration
[DataMember]
public string Email { get; set; }
Property Value
Type |
Description |
System.String |
|
EmailConfirmedDate
Declaration
[DataMember]
public DateTime? EmailConfirmedDate { get; set; }
Property Value
Type |
Description |
System.Nullable<System.DateTime> |
|
FailedPasswordAttempts
Declaration
[IgnoreDataMember]
public int FailedPasswordAttempts { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Groups
Gets the groups that user is part of
Declaration
[DataMember]
public IEnumerable<IReadOnlyUserGroup> Groups { get; }
Property Value
InvitedDate
Declaration
[DataMember]
public DateTime? InvitedDate { get; set; }
Property Value
Type |
Description |
System.Nullable<System.DateTime> |
|
IsApproved
Declaration
[DataMember]
public bool IsApproved { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IsLockedOut
Declaration
[IgnoreDataMember]
public bool IsLockedOut { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Language
Declaration
[DataMember]
public string Language { get; set; }
Property Value
Type |
Description |
System.String |
|
LastLockoutDate
Declaration
[IgnoreDataMember]
public DateTime LastLockoutDate { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
LastLoginDate
Declaration
[IgnoreDataMember]
public DateTime LastLoginDate { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
LastPasswordChangeDate
Declaration
[IgnoreDataMember]
public DateTime LastPasswordChangeDate { get; set; }
Property Value
Type |
Description |
System.DateTime |
|
Name
Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
PasswordQuestion
Declaration
[IgnoreDataMember]
public string PasswordQuestion { get; set; }
Property Value
Type |
Description |
System.String |
|
ProfileData
Declaration
public IProfile ProfileData { get; }
Property Value
ProviderUserKey
Declaration
[IgnoreDataMember]
public object ProviderUserKey { get; set; }
Property Value
Type |
Description |
System.Object |
|
RawPasswordAnswerValue
Declaration
[IgnoreDataMember]
public string RawPasswordAnswerValue { get; set; }
Property Value
Type |
Description |
System.String |
|
RawPasswordValue
Declaration
[DataMember]
public string RawPasswordValue { get; set; }
Property Value
Type |
Description |
System.String |
|
SecurityStamp
The security stamp used by ASP.Net identity
Declaration
[IgnoreDataMember]
public string SecurityStamp { get; set; }
Property Value
Type |
Description |
System.String |
|
SessionTimeout
Gets or sets the session timeout.
Declaration
[DataMember]
public int SessionTimeout { get; set; }
Property Value
Type |
Description |
System.Int32 |
The session timeout.
|
StartContentIds
Gets or sets the start content id.
Declaration
[DataMember]
public int[] StartContentIds { get; set; }
Property Value
Type |
Description |
System.Int32[] |
The start content id.
|
Gets or sets the start media id.
Declaration
[DataMember]
public int[] StartMediaIds { get; set; }
Property Value
Type |
Description |
System.Int32[] |
The start media id.
|
TourData
A Json blob stored for recording tour data for a user
Declaration
[DataMember]
public string TourData { get; set; }
Property Value
Type |
Description |
System.String |
|
Username
Declaration
[DataMember]
public string Username { get; set; }
Property Value
Type |
Description |
System.String |
|
UserState
Declaration
public UserState UserState { get; }
Property Value
Methods
AddGroup(IReadOnlyUserGroup)
Declaration
public void AddGroup(IReadOnlyUserGroup group)
Parameters
ClearGroups()
Declaration
public void ClearGroups()
DeepClone()
Declaration
public override object DeepClone()
Returns
Type |
Description |
System.Object |
|
RemoveGroup(String)
Declaration
public void RemoveGroup(string group)
Parameters
Type |
Name |
Description |
System.String |
group |
|
Explicit Interface Implementations
IUser.AddAllowedSection(String)
Declaration
[Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")]
void IUser.AddAllowedSection(string sectionAlias)
Parameters
Type |
Name |
Description |
System.String |
sectionAlias |
|
IUser.RemoveAllowedSection(String)
Declaration
[Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")]
void IUser.RemoveAllowedSection(string sectionAlias)
Parameters
Type |
Name |
Description |
System.String |
sectionAlias |
|
IUser.StartContentId
Declaration
[Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")]
int IUser.StartContentId { get; set; }
Returns
Type |
Description |
System.Int32 |
|
Declaration
[Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")]
int IUser.StartMediaId { get; set; }
Returns
Type |
Description |
System.Int32 |
|
IUser.UserType
Declaration
[Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")]
IUserType IUser.UserType { get; set; }
Returns