This commit is contained in:
Michael 2017-03-24 20:45:16 -04:00
parent 32b46c03cd
commit 38640e179b
2 changed files with 6 additions and 1 deletions

View file

@ -102,6 +102,11 @@ public ActionResult CreateUser(CreateUserModel model)
db.SaveChanges(); db.SaveChanges();
var uman = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>(); var uman = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
uman.AddToRole(user.Id, ACL.LowestPriorityRole().Name); uman.AddToRole(user.Id, ACL.LowestPriorityRole().Name);
uman.SendEmail(user.Id, "Welcome to the Project: Unite open alpha.", $@"**Hey there, {user.DisplayName}!
Michael here - it's finally happening. Project: Unite is coming together and it's time we merge everyone's user accounts.
Unlike previous ShiftOS site revamps, your account got migrated over. However, there's one thing you need to do. You need to [reset your password]({Url.Action("ForgotPassword", "Account")})! Just click that link and follow the instructions and we'll send you another email with details on how to get into your account.");
return RedirectToAction("Users"); return RedirectToAction("Users");
} }

View file

@ -22,7 +22,7 @@
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td><input type="submit" value="Add" /></td> <td><input class="btn btn-primary" type="submit" value="Add" /></td>
</tr> </tr>
</table> </table>
} }