/
ProfileModel.cs
65 lines (52 loc) · 1.9 KB
/
ProfileModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Umbraco.Web.Models;
namespace Umbraco.Core.Models.Security
{
/// <summary>
/// A readonly member profile model
/// </summary>
public class ProfileModel : PostRedirectModel
{
[Required]
[RegularExpression(@"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
ErrorMessage = "Please enter a valid e-mail address")]
public string Email { get; set; }
/// <summary>
/// The member's real name
/// </summary>
public string Name { get; set; }
/// <summary>
/// The member's member type alias
/// </summary>
[ReadOnly(true)]
public string MemberTypeAlias { get; set; }
[ReadOnly(true)]
public string UserName { get; set; }
[ReadOnly(true)]
public string Comment { get; set; }
[ReadOnly(true)]
public bool IsApproved { get; set; }
[ReadOnly(true)]
public bool IsLockedOut { get; set; }
[ReadOnly(true)]
public DateTime LastLockoutDate { get; set; }
[ReadOnly(true)]
public DateTime CreationDate { get; set; }
[ReadOnly(true)]
public DateTime LastLoginDate { get; set; }
[ReadOnly(true)]
public DateTime LastActivityDate { get; set; }
[ReadOnly(true)]
public DateTime LastPasswordChangedDate { get; set; }
/// <summary>
/// The list of member properties
/// </summary>
/// <remarks>
/// Adding items to this list on the front-end will not add properties to the member in the database.
/// </remarks>
public List<UmbracoProperty> MemberProperties { get; set; } = new List<UmbracoProperty>();
}
}