Skip to content

incendium.user.get_emails

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

Description

Get a list of email addresses from a User Source.

Syntax

incendium.user.get_emails([user_source], [filter_role])

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 email addresses for users that are assigned to a matching role will be retrieved, otherwise all email addresses will be retrieved. Optional.

Returns:

  • lis[str]: A list of User's email address(es).

Recommendations

None.

Code Examples

from incendium import user as _user


def get_supervisors_emails():
    """Get a list of email addresses for all Supervisors.

    Returns:
        list[str]: A List of strings that holds all the email
            addresses for Supervisors.
    """
    return _user.get_emails(filter_role="Supervisor")
Clone this wiki locally