Esempio n. 1
0
        public async Task AfterRegistrationAsync(
            ApplicationUser applicationUser,
            DateTime utcDateOfBirth,
            IUrlHelper urlHelper,
            string creyTicket,
            int?avatarId)
        {
            if (!await featureGate_.Value.IsFeatureEnabledAsync(Features.LazyUserProfile))
            {
                await creyRestClient_.CreateUserProfileAsync(applicationUser.AccountId, applicationUser.UserName, applicationUser.NewsletterSubscribed, utcDateOfBirth);
            }

            if (avatarId.HasValue)
            {
                await creyRestClient_.SetUserAvatar(avatarId.Value);
            }

            await SendVerificationEmailAsync(applicationUser, urlHelper);

            if (!string.IsNullOrWhiteSpace(creyTicket))
            {
                analyticsClient_.SendReferralFinishEvent(creyTicket);
            }
            analyticsClient_.SendRegisterEvent();
        }