Skip to contents

Retrieve a user's Team Membership Status bundle for this team.

Usage

synGetUserMembershipStatus(instance, user_id, synapse_client=NULL)

Arguments

instance

(Team) The Team instance to operate on.

user_id

(character) Synapse user ID

synapse_client

(Optional[Synapse]) If not provided, the last created instance from the Synapse class constructor will be used.

Value

TeamMembershipStatus object

Examples

if (FALSE) { # \dontrun{
## Check if a user is a member of a team
    # This example shows how to check a user's membership status in a team.
    library(synapser)
    synLogin()

    team = Team() |> synGetFromId(id = 123456L)

    # Check membership status for a specific user
    user_id = "3350396"  # Replace with actual user ID
    status = team |> synGetUserMembershipStatus(user_id = user_id)

    cat("User ID:", status$user_id, "\n")
    cat("Is member:", status$is_member, "\n")
    cat("Can join:", status$can_join, "\n")
    cat("Has open invitation:", status$has_open_invitation, "\n")
    cat("Has open request:", status$has_open_request, "\n")
    cat("Membership approval required:", status$membership_approval_required, "\n")
} # }