public TeamMember(User user, Role role, bool isPageAdmin, bool isCreator = false) { FirstName = user.FirstName; LastName = user.LastName; Email = user.Email; GravatarEmail = user.GravatarEmail; Role = role; UserName = user.UserName; Slug = user.UserName.GenerateSlug(); IsPageAdmin = isPageAdmin; UserId = user.Id; Image = GetImage(); IsCreator = isCreator; }
public ActionResult Edit(User user) { var oldUser = RavenSession.Load<User>(CurrentUser.Id); oldUser.GravatarEmail = user.GravatarEmail; oldUser.Email = user.Email; oldUser.FirstName = user.FirstName; oldUser.LastName = user.LastName; oldUser.Description = user.Description; oldUser.DisplayEmail = user.DisplayEmail; oldUser.GitHub = user.GitHub; RavenSession.SaveChanges(); return RedirectToAction("edit", "user", new { username = CurrentUser.Slug }); }
public EventActionUser(User user) { Id = user.Id; Username = user.UserName; }
public IssueUser(User user) { UserId = user.Id; DisplayName = user.UserName; Image = user.GetImage(); }
public ActionResult Register(User user) { user.Created = DateTime.Now; user.Password = BCrypt.Net.BCrypt.HashPassword(user.Password); user.Slug = user.UserName.GenerateSlug(); if (string.IsNullOrEmpty(user.GravatarEmail)) user.GravatarEmail = user.Email; RavenSession.Store(user); RavenSession.SaveChanges(); LoginUser(user.Id); return RedirectToAction("Index","Home"); return View(); }
public ActionResult Manage(User user) { if (CurrentUser == null) return Redirect("/user/login"); return View(); }