public Models.User Create(string username, string passord, Models.UserProfile profile, DateTime? created =null) { var user = new User() { Username = username, Password = Crypto.HashPassword(passord), DateCreated = created.HasValue ? created.Value : DateTime.Now, Profile = profile }; _users.Create(user); _context.SaveChanges(); return user; }
public void Unfollow(string username, User follower) { _users.DeleteFollower(username, follower); _context.SaveChanges(); }
public Ribbit Create(User user, string status, DateTime? created = null) { return Create(user.Id, status, created); }
public void Login(User user) { _session["UserId"] = user.Id; }