Esempio n. 1
0
        public void RegisterUser(string email, string password, string profileId)
        {
            Assert.ArgumentNotNullOrEmpty(email, nameof(email));
            Assert.ArgumentNotNullOrEmpty(password, nameof(password));

            var fullName = Context.Domain.GetFullName(email);

            Assert.IsNotNullOrEmpty(fullName, "Can't retrieve full userName");

            var user = User.Create(fullName, password);

            user.Profile.Email = email;
            if (!string.IsNullOrEmpty(profileId))
            {
                user.Profile.ProfileItemId = profileId;
            }

            user.Profile.Save();
            accountTrackerService.TrackRegistration();
            this.Login(email, password);
        }
 public void Process(AccountsPipelineArgs args)
 {
     _userProfileService.UpdateContactFacetData(args.User.Profile);
     _accountTrackerService.TrackRegistration();
 }