예제 #1
0
 public JoinController(IPageflowEngine pageflowEngine, IAccountsManager accountsManager, IMemberAccountsCommand memberAccountsCommand, IAccountVerificationsCommand accountVerificationsCommand, IMembersQuery membersQuery, ICandidatesCommand candidatesCommand, ICandidatesQuery candidatesQuery, ICandidateResumesCommand candidateResumesCommand, IResumesQuery resumesQuery, IAffiliationItemsFactory affiliationItemsFactory, IMemberAffiliationsCommand memberAffiliationsCommand, IMemberAffiliationsQuery memberAffiliationsQuery, IMemberStatusQuery memberStatusQuery, IFilesQuery filesQuery, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, IReferralsCommand referralsCommand, IReferralsQuery referralsQuery, IMemberFriendsCommand memberFriendsCommand, IMemberFriendsQuery memberFriendsQuery, ISettingsQuery settingsQuery, ISettingsCommand settingsCommand)
     : base(Routes, pageflowEngine)
 {
     _membersQuery                = membersQuery;
     _memberAccountsCommand       = memberAccountsCommand;
     _accountVerificationsCommand = accountVerificationsCommand;
     _accountsManager             = accountsManager;
     _candidatesQuery             = candidatesQuery;
     _candidatesCommand           = candidatesCommand;
     _candidateResumesCommand     = candidateResumesCommand;
     _resumesQuery                = resumesQuery;
     _filesQuery = filesQuery;
     _affiliationItemsFactory   = affiliationItemsFactory;
     _memberAffiliationsCommand = memberAffiliationsCommand;
     _memberAffiliationsQuery   = memberAffiliationsQuery;
     _memberStatusQuery         = memberStatusQuery;
     _locationQuery             = locationQuery;
     _industriesQuery           = industriesQuery;
     _referralsCommand          = referralsCommand;
     _referralsQuery            = referralsQuery;
     _memberFriendsCommand      = memberFriendsCommand;
     _memberFriendsQuery        = memberFriendsQuery;
     _settingsQuery             = settingsQuery;
     _settingsCommand           = settingsCommand;
 }
예제 #2
0
        public static void AddTestProfilePhoto(this IMemberAccountsCommand memberAccountsCommand, Member member)
        {
            var fileReference = FilesCommand.CreateTestPhoto(0, FileType.ProfilePhoto);

            member.PhotoId = fileReference.Id;
            memberAccountsCommand.UpdateMember(member);
        }
예제 #3
0
 public ActivationController(IAccountsManager accountsManager, ILoginCredentialsQuery loginCredentialsQuery, IFaqsQuery faqsQuery, IMemberAccountsCommand memberAccountsCommand, IAccountVerificationsCommand accountVerificationsCommand, IAuthenticationManager authenticationManager)
     : base(accountsManager, loginCredentialsQuery, faqsQuery)
 {
     _memberAccountsCommand       = memberAccountsCommand;
     _accountVerificationsCommand = accountVerificationsCommand;
     _authenticationManager       = authenticationManager;
 }
예제 #4
0
 public SettingsController(IMemberAccountsCommand memberAccountsCommand, ILoginCredentialsQuery loginCredentialsQuery, IUserAccountsCommand userAccountsCommand, IAuthenticationManager authenticationManager, IAccountVerificationsCommand accountVerificationsCommand, ISettingsQuery settingsQuery, ISettingsCommand settingsCommand, IVerticalsQuery verticalsQuery)
 {
     _memberAccountsCommand       = memberAccountsCommand;
     _loginCredentialsQuery       = loginCredentialsQuery;
     _userAccountsCommand         = userAccountsCommand;
     _authenticationManager       = authenticationManager;
     _accountVerificationsCommand = accountVerificationsCommand;
     _settingsQuery   = settingsQuery;
     _settingsCommand = settingsCommand;
     _verticalsQuery  = verticalsQuery;
 }
예제 #5
0
 public VerticalsController(IVerticalsCommand verticalsCommand, IVerticalsQuery verticalsQuery, ICommunitiesQuery communitiesQuery, IWebSiteQuery webSiteQuery, IMembersQuery membersQuery, ICandidatesQuery candidatesQuery, IResumesQuery resumesQuery, IMemberAccountsCommand memberAccountsCommand, IAccountVerificationsCommand accountVerificationsCommand)
 {
     _verticalsCommand            = verticalsCommand;
     _verticalsQuery              = verticalsQuery;
     _communitiesQuery            = communitiesQuery;
     _webSiteQuery                = webSiteQuery;
     _membersQuery                = membersQuery;
     _candidatesQuery             = candidatesQuery;
     _resumesQuery                = resumesQuery;
     _memberAccountsCommand       = memberAccountsCommand;
     _accountVerificationsCommand = accountVerificationsCommand;
 }
예제 #6
0
        public static void UpdateInvalidMember(this IMemberAccountsCommand memberAccountsCommand, Member member)
        {
            // Keep track of changes.

            var originalCredentials = LoginCredentialsQuery.GetCredentials(member.Id);

            // Save.

            MembersRepository.UpdateMember(member);

            originalCredentials.LoginId = member.GetBestEmailAddress().Address;
            LoginCredentialsCommand.UpdateCredentials(member.Id, originalCredentials, member.Id);
        }
예제 #7
0
        protected override void OnInit()
        {
            base.OnInit();

            _verticalsCommand              = Container.Current.Resolve <IVerticalsCommand>();
            _authenticationManager         = Container.Current.Resolve <IAuthenticationManager>();
            _cookieManager                 = Container.Current.Resolve <ICookieManager>();
            _externalAuthenticationCommand = Container.Current.Resolve <IExternalAuthenticationCommand>();
            _userAccountsCommand           = Container.Current.Resolve <IUserAccountsCommand>();
            _memberAccountsCommand         = Container.Current.Resolve <IMemberAccountsCommand>();
            _memberAffiliationsCommand     = Container.Current.Resolve <IMemberAffiliationsCommand>();
            _locationQuery                 = Container.Current.Resolve <ILocationQuery>();

            _nonVerticalHost = ApplicationContext.Instance.GetProperty("website.linkme.host");
        }
예제 #8
0
 public AccountsManager(ILoginAuthenticationCommand loginAuthenticationCommand, IAuthenticationManager authenticationManager, IDevAuthenticationManager devAuthenticationManager, IMemberAccountsCommand memberAccountsCommand, IEmployerAccountsCommand employerAccountsCommand, IOrganisationsCommand organisationsCommand, ILoginCredentialsQuery loginCredentialsQuery, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, IPhoneNumbersQuery phoneNumbersQuery, ICommunitiesQuery communitiesQuery, IVerticalsQuery verticalsQuery, IPartnersQuery partnersQuery, ICookieManager cookieManager, IReferralsManager referralsManager, IProfilesCommand profilesCommand, IProfilesQuery profilesQuery)
 {
     _loginAuthenticationCommand = loginAuthenticationCommand;
     _authenticationManager      = authenticationManager;
     _devAuthenticationManager   = devAuthenticationManager;
     _memberAccountsCommand      = memberAccountsCommand;
     _employerAccountsCommand    = employerAccountsCommand;
     _organisationsCommand       = organisationsCommand;
     _loginCredentialsQuery      = loginCredentialsQuery;
     _locationQuery     = locationQuery;
     _industriesQuery   = industriesQuery;
     _phoneNumbersQuery = phoneNumbersQuery;
     _communitiesQuery  = communitiesQuery;
     _verticalsQuery    = verticalsQuery;
     _partnersQuery     = partnersQuery;
     _cookieManager     = cookieManager;
     _referralsManager  = referralsManager;
     _profilesCommand   = profilesCommand;
     _profilesQuery     = profilesQuery;
 }
예제 #9
0
 public ProfilesApiController(ILocationQuery locationQuery, IIndustriesQuery industriesQuery, IResumesQuery resumesQuery, ICandidatesQuery candidatesQuery, IResumeFilesQuery resumeFilesQuery, IMemberStatusQuery memberStatusQuery, IEmailsCommand emailsCommand, IMemberAccountsCommand memberAccountsCommand, IAccountVerificationsCommand accountVerificationsCommand, ICandidatesCommand candidatesCommand, ICandidateResumesCommand candidateResumesCommand, ICandidateResumeFilesCommand candidateResumeFilesCommand, IParseResumesCommand parseResumesCommand, IMemberPhotosCommand memberPhotosCommand, IFilesCommand filesCommand, IFilesQuery filesQuery, ISettingsQuery settingsQuery, ISettingsCommand settingsCommand)
 {
     _locationQuery               = locationQuery;
     _industriesQuery             = industriesQuery;
     _resumesQuery                = resumesQuery;
     _candidatesQuery             = candidatesQuery;
     _resumeFilesQuery            = resumeFilesQuery;
     _memberStatusQuery           = memberStatusQuery;
     _emailsCommand               = emailsCommand;
     _memberAccountsCommand       = memberAccountsCommand;
     _accountVerificationsCommand = accountVerificationsCommand;
     _candidatesCommand           = candidatesCommand;
     _candidateResumesCommand     = candidateResumesCommand;
     _candidateResumeFilesCommand = candidateResumeFilesCommand;
     _parseResumesCommand         = parseResumesCommand;
     _memberPhotosCommand         = memberPhotosCommand;
     _filesCommand                = filesCommand;
     _filesQuery      = filesQuery;
     _settingsQuery   = settingsQuery;
     _settingsCommand = settingsCommand;
 }
예제 #10
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, int index, bool activated)
 {
     return(memberAccountsCommand.CreateTestMember(string.Format(UserIdFormat, index), DefaultPassword, string.Format(FirstNameFormat, index), string.Format(LastNameFormat, index), activated, null));
 }
예제 #11
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, string emailAddress, string firstName, string lastName, Guid?affiliateId)
 {
     return(memberAccountsCommand.CreateTestMember(emailAddress, DefaultPassword, firstName, lastName, true, affiliateId));
 }
예제 #12
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, string emailAddress, string password, string firstName, string lastName)
 {
     return(memberAccountsCommand.CreateTestMember(emailAddress, password, firstName, lastName, true, null));
 }
예제 #13
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, string emailAddress, bool activated)
 {
     return(memberAccountsCommand.CreateTestMember(emailAddress, DefaultPassword, string.Format(FirstNameFormat, 0), string.Format(LastNameFormat, 0), activated, null));
 }
예제 #14
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, string emailAddress, Guid?affiliateId)
 {
     return(memberAccountsCommand.CreateTestMember(emailAddress, string.Format(FirstNameFormat, 0), string.Format(LastNameFormat, 0), affiliateId));
 }
예제 #15
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, bool createKnownInvalidMember, string emailAddress)
 {
     return(memberAccountsCommand.CreateTestMember(createKnownInvalidMember, emailAddress, string.Format(FirstNameFormat, 0), string.Format(LastNameFormat, 0)));
 }
예제 #16
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, string emailAddress, string firstName, string lastName, DateTime?createTime, LocationReference location)
 {
     return(memberAccountsCommand.CreateTestMember(false, emailAddress, DefaultPassword, firstName, lastName, true, null, createTime, location));
 }
예제 #17
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, int index, DateTime createTime)
 {
     return(memberAccountsCommand.CreateTestMember(string.Format(UserIdFormat, index), string.Format(FirstNameFormat, index), string.Format(LastNameFormat, index), createTime, null));
 }
예제 #18
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, int index, LocationReference location)
 {
     return(memberAccountsCommand.CreateTestMember(string.Format(UserIdFormat, index), string.Format(FirstNameFormat, index), string.Format(LastNameFormat, index), null, location));
 }
예제 #19
0
        private static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, bool createKnownInvalidMember, string emailAddress, string password, string firstName, string lastName, bool activated, Guid?affiliateId, DateTime?createTime, LocationReference location)
        {
            var member = new Member
            {
                EmailAddresses = new List <EmailAddress> {
                    new EmailAddress {
                        Address = emailAddress, IsVerified = true
                    }
                },
                IsActivated  = activated,
                IsEnabled    = true,
                PhoneNumbers = new List <PhoneNumber> {
                    new PhoneNumber {
                        Number = DefaultPhoneNumber, Type = PhoneNumberType.Mobile
                    }
                },
                FirstName   = firstName,
                LastName    = lastName,
                Gender      = DefaultGender,
                DateOfBirth = DefaultDateOfBirth,
            };

            if (createTime.HasValue)
            {
                member.CreatedTime = createTime.Value;
            }

            var credentials = new LoginCredentials
            {
                LoginId      = emailAddress,
                PasswordHash = LoginCredentials.HashToString(password)
            };

            // Deny public access to real name, because existing tests rely on this. Might need to change this later.

            member.VisibilitySettings = new VisibilitySettings();
            member.VisibilitySettings.Personal.PublicVisibility &= ~PersonalVisibility.Name;

            if (location == null)
            {
                member.Address = new Address {
                    Location = new LocationReference()
                };
                LocationQuery.ResolvePostalSuburb(member.Address.Location, DefaultCountry, DefaultLocation);
            }
            else
            {
                member.Address = new Address {
                    Location = location
                };
            }

            if (createKnownInvalidMember)
            {
                CreateInvalidMember(member, credentials, affiliateId);
            }
            else
            {
                memberAccountsCommand.CreateMember(member, credentials, affiliateId);
            }

            return(member);
        }
예제 #20
0
 private static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, string emailAddress, string password, string firstName, string lastName, bool activated, Guid?affiliateId)
 {
     return(memberAccountsCommand.CreateTestMember(false, emailAddress, password, firstName, lastName, activated, affiliateId, null, null));
 }
예제 #21
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, int index, Guid?affiliateId)
 {
     return(memberAccountsCommand.CreateTestMember(string.Format(UserIdFormat, index), string.Format(FirstNameFormat, index), string.Format(LastNameFormat, index), affiliateId));
 }
예제 #22
0
 public static Member CreateTestMember(this IMemberAccountsCommand memberAccountsCommand, bool createKnownInvalidMember, string emailAddress, string firstName, string lastName)
 {
     return(memberAccountsCommand.CreateTestMember(createKnownInvalidMember, emailAddress, DefaultPassword, firstName, lastName, true, null));
 }