示例#1
0
 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;
 }
示例#2
0
        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 });
        }
示例#3
0
 public EventActionUser(User user)
 {
     Id = user.Id;
     Username = user.UserName;
 }
示例#4
0
文件: Issue.cs 项目: ja1984/ProjectZ
 public IssueUser(User user)
 {
     UserId = user.Id;
     DisplayName = user.UserName;
     Image = user.GetImage();
 }
示例#5
0
        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();
        }
示例#6
0
        public ActionResult Manage(User user)
        {
            if (CurrentUser == null)
                return Redirect("/user/login");

            return View();
        }