private AMFUserLogin CreateTestUser(string emailAddress) { AMFUserLogin retVal = new AMFUserLogin(); retVal.Email = emailAddress; retVal.FirstName = "Artie"; retVal.LastName = "Test"; retVal.UpdatePassword(TestHashedPassword, TestPasswordSalt); return(retVal); }
public static AMFUserLogin GenerateNewUser(int userId, string userName, string hashedPassword, string passwordSalt, int passwordIterations) { AMFUserLogin retVal = new AMFUserLogin(); retVal.Id = userId; retVal.Email = userName; retVal.FirstName = string.Empty; retVal.LastName = string.Empty; retVal.UpdatePassword(hashedPassword, passwordSalt); return(retVal); }
public static AMFUserLogin Create(string userName, string password, string firstName, string lastName, string passwordHint) { AMFUserLogin retVal = new AMFUserLogin(); retVal.Email = userName; retVal.FirstName = firstName; retVal.LastName = lastName; retVal.PasswordHint = passwordHint; retVal.UpdatePassword(password); retVal.DateCreated = DateTime.Now; return(retVal); }
/// <summary> /// Update the editable fields for a User /// </summary> /// <param name="userLogin">The source user</param> /// <returns>The updated user</returns> public AMFUserLogin Update(long userId, string firstName, string lastName, string password) { AMFUserLogin retVal = this.UserRepository.GetById(userId); if (retVal != null) { retVal.FirstName = firstName; retVal.LastName = lastName; retVal.UpdatePassword(password); retVal = this.UserRepository.Save(retVal); } return(retVal); }