AssignedAccessSettings.GetForUser(User) Method

Definition

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