public async Task Handle(EmailChanged e, IHandleContext ctx) { var get = await _uow.Get <presentationUsers.Models.AU_UserResponse>(e.UserId); get.Email = e.Email; _uow.Save(get); ctx.UpdateAsync(get, ChangeType.CHANGE); }
public async Task Handle(RolesUnassigned e, IHandleContext ctx) { var get = await _uow.Get <presentationUsers.Models.AU_UserResponse>(e.UserAuthId); get.Roles = get.Roles.Except(e.Roles).Distinct(); _uow.Save(get); ctx.UpdateAsync(get, ChangeType.CHANGE); }
public async Task Handle(Deactivated e, IHandleContext ctx) { var get = await _uow.Get <presentationUsers.Models.AU_UserResponse>(e.UserAuthId); get.LockedDate = DateTime.UtcNow; _uow.Save(get); ctx.UpdateAsync(get, ChangeType.CHANGE); }
public async Task Handle(LoggedIn e, IHandleContext ctx) { var get = await _uow.Get <presentationUsers.Models.AU_UserResponse>(e.UserId); get.LastLoginAttempt = DateTime.UtcNow; _uow.Save(get); ctx.UpdateAsync(get, ChangeType.CHANGE); _Demo.Report("Login", new { Name = get.Name, Id = get.Id, Email = get.Email }); }
public Task Handle(Registered e, IHandleContext ctx) { var get = new presentationUsers.Models.AU_UserResponse { Id = e.UserAuthId, Password = e.Password }; _uow.Save(get); ctx.UpdateAsync(get, ChangeType.NEW); return(Task.FromResult(0)); }
public async Task Handle(Updated e, IHandleContext ctx) { var get = await _uow.Get <presentationUsers.Models.AU_UserResponse>(e.UserAuthId); get.Name = e.DisplayName; get.Email = e.PrimaryEmail; get.Nickname = e.Nickname; get.Timezone = e.Timezone; get.ModifiedDate = DateTime.UtcNow; _uow.Save(get); ctx.UpdateAsync(get, ChangeType.CHANGE); }