public async Task <IOperationResult> CreateRegisterInvite(string toEmail)
        {
            try
            {
                var userToCreate = new ApplicationUser
                {
                    Email    = toEmail,
                    UserName = toEmail
                };

                await _userManager.CreateAsync(userToCreate);

                var createdUser = await _userManager.FindByEmailAsync(userToCreate.Email);

                await _userManager.SetLockoutEnabledAsync(createdUser, true);

                var code = await _userManager.GenerateEmailConfirmationTokenAsync(createdUser);

                var emailBody =
                    $@"Accept invite: {UrlHelperExtensions.ConfirmInviteCallbackLink(createdUser.Id, code)}";
                await _emailSender.SendEmailAsync(createdUser.Email, "Accept invite", emailBody);

                return(OperationResult.Success);
            }
            catch (Exception ex)
            {
                return(OperationResult.Failed(ex.Message));
            }
        }