Skip to content

incendium.user.get_users

César Román edited this page Apr 30, 2024 · 9 revisions

Description

Get a list of PyUser objects from a User Source filtered by role.

Syntax

incendium.user.get_user(user_source, [failover])

Args:

  • user_source (str): The name of the User Source. If not provided, the default User Source will be consulted. Optional.
  • filter_role (str): The name of the role. If provided, a list of PyUser objects for users that are assigned to a matching role will be retrieved, otherwise all users will be retrieved as PyUser objects. Optional.

Returns:

  • list[PyUser]: A list of PyUser objects..

Recommendations

None.

Code Examples

Client Startup Script

from __future__ import print_function

from incendium import user as _user

# Print all users
users = _user.get_users("User Source", "Failover Source")

for user in users:
    print(user.Username)
Clone this wiki locally