public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser) { var command = new Domain.Authentication.Users.Commands.Update { UserAuthId = existingUser.UserName, PrimaryEmail = newUser.PrimaryEmail, Nickname = newUser.Nickname, DisplayName = newUser.DisplayName, Timezone = newUser.TimeZone }; _bus.CommandToDomain(command).Wait(); existingUser.PrimaryEmail = newUser.PrimaryEmail; existingUser.Nickname = newUser.Nickname; existingUser.DisplayName = newUser.DisplayName; existingUser.TimeZone = newUser.TimeZone; return(existingUser); }
public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser, string password) { var command = new Domain.Authentication.Users.Commands.ChangePassword { UserAuthId = existingUser.UserName, Password = password }; _bus.CommandToDomain(command).Wait(); var command2 = new Domain.Authentication.Users.Commands.Update { UserAuthId = existingUser.UserName, DisplayName = newUser.DisplayName, Nickname = newUser.Nickname, PrimaryEmail = newUser.PrimaryEmail, Timezone = newUser.TimeZone, }; _bus.CommandToDomain(command2).Wait(); return(existingUser); }