예제 #1
0
        async Task <UserDetailsModel> GetUserDetailsForId(Guid id)
        {
            var user = await adminService.GetUserByObjectIdAsync(id);

            // See if we have a key vault
            string vaultName = null;

            if (user.KeyVaultUrl != null)
            {
                vaultName = user.KeyVaultUrl.Host.Substring(0, user.KeyVaultUrl.Host.IndexOf("."));
            }
            var model = new UserDetailsModel
            {
                User      = user,
                VaultName = vaultName
            };

            return(model);
        }