mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-02-02 13:07:34 +00:00
System Name fiield in register view
This commit is contained in:
parent
76be5076e0
commit
73402c31a6
3 changed files with 14 additions and 1 deletions
|
@ -200,7 +200,7 @@ The address used to send this message is not a no-reply address. In fact, my nam
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var user = new ApplicationUser { UserName = model.Email, Email = model.Email, DisplayName = model.Username, Codepoints = 0, JoinedAt = DateTime.Now, MutedAt = DateTime.Now, BannedAt = DateTime.Now, LastLogin = DateTime.Now };
|
var user = new ApplicationUser { SystemName = model.SystemName, UserName = model.Email, Email = model.Email, DisplayName = model.Username, Codepoints = 0, JoinedAt = DateTime.Now, MutedAt = DateTime.Now, BannedAt = DateTime.Now, LastLogin = DateTime.Now };
|
||||||
var result = await UserManager.CreateAsync(user, model.Password);
|
var result = await UserManager.CreateAsync(user, model.Password);
|
||||||
if (result.Succeeded)
|
if (result.Succeeded)
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,11 @@ namespace Project_Unite.Models
|
||||||
[Display(Name = "Email")]
|
[Display(Name = "Email")]
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "You require a system name. This is the hostname you will use when inside ShiftOS.")]
|
||||||
|
[MinLength(5, ErrorMessage ="Your System Name must have at least 5 characters in it.")]
|
||||||
|
[Display(Name ="System Name")]
|
||||||
|
public string SystemName { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[MaxLength(25, ErrorMessage ="Your username must be less than 25 characters long.")]
|
[MaxLength(25, ErrorMessage ="Your username must be less than 25 characters long.")]
|
||||||
[MinLength(3, ErrorMessage ="Your username must have a minimum of 3 characters.")]
|
[MinLength(3, ErrorMessage ="Your username must have a minimum of 3 characters.")]
|
||||||
|
|
|
@ -27,6 +27,14 @@
|
||||||
@Html.TextBoxFor(m => m.Username, new { @class = "form-control" })
|
@Html.TextBoxFor(m => m.Username, new { @class = "form-control" })
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
@Html.LabelFor(m => m.SystemName, new { @class = "col-md-2 control-label" })
|
||||||
|
<div class="col-md-10">
|
||||||
|
@Html.TextBoxFor(m => m.SystemName, new { @class = "form-control" })
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
|
|
Loading…
Add table
Reference in a new issue