public void Add(Guid groupId, GroupMemberSubscriptionModel model) { var groupMember = GetNewGroupMember(groupId, model); _groupMemberRepository.Add(groupMember); _memberCacheService.UpdateMemberCache(groupMember.MemberId); }
public override void AddMany(Guid groupId, IEnumerable <Guid> memberIds) { var enumeratedMemberIds = memberIds as Guid[] ?? memberIds.ToArray(); var groupMembers = enumeratedMemberIds .Select(memberId => GetNewGroupMember(groupId, memberId)) .ToList(); _groupMemberRepository.Add(groupMembers); _memberCacheService.UpdateMemberCache(enumeratedMemberIds); }
public void MemberUpdateHandler( IMemberService sender, SaveEventArgs <IMember> @event) { foreach (var member in @event.SavedEntities) { _cacheableIntranetMemberService.UpdateMemberCache(member.Id); EnableUser(member.Key); } }
public void ProcessMemberDeleting(IMemberService sender, DeleteEventArgs <IMember> args) { foreach (var member in args.DeletedEntities) { member.IsLockedOut = true; _memberService.Save(member); _cacheableIntranetMemberService.UpdateMemberCache(member.Key); } if (args.CanCancel) { args.Cancel = true; } }
private void SetDefaultUserData() { var mbr = _memberService.GetByEmail(UsersInstallationConstants.DefaultMember.Email); if (mbr != null && !_memberServiceHelper.IsFirstLoginPerformed(mbr)) { _memberService.SavePassword(mbr, UsersInstallationConstants.DefaultMember.Password); _memberService.AssignRole(mbr.Id, UsersInstallationConstants.MemberGroups.GroupWebMaster); _cacheableIntranetMemberService.UpdateMemberCache(mbr.Key); } }
public virtual bool MemberChanged(Guid memberId) { var member = _memberService.GetByKey(memberId); var groups = _memberService.GetAllRoles(member.Id).ToList(); if (!groups.Any()) { _memberGroupService.AssignDefaultMemberGroup(member.Id); } if (groups.Count > 1) { _memberGroupService.RemoveFromAll(member.Id); _memberGroupService.AssignDefaultMemberGroup(member.Id); } _cacheableIntranetMemberService.UpdateMemberCache(memberId); return(true); }
public virtual void MemberChanged(Guid memberId) { _cacheableIntranetMemberService.UpdateMemberCache(memberId); }