AssignedAccessSettings.GetForUser(User) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the assigned access settings for the specified user.
public:
static AssignedAccessSettings ^ GetForUser(User ^ user);
static AssignedAccessSettings GetForUser(User const& user);
public static AssignedAccessSettings GetForUser(User user);
function getForUser(user)
Public Shared Function GetForUser (user As User) As AssignedAccessSettings
Parameters
- user
- User
The user to get settings for.
Returns
A settings object that contains the user's current assigned access settings.
Examples
using Windows.System.UserProfile;
// Retrieve AssignedAccessSettings for all users
async void GetAssignedAccessSettingsForAllUsers()
{
foreach (var user in await Windows.System.User.FindAllAsync())
{
var targetUserSettings = AssignedAccessSettings.GetForUser(user);
// determine the behavior according to the user's AssignedAccessSettings
}
}
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för