30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

LearnDash Manage Group Leaders

learndash/manage-group-leaders adds or removes the users who lead a group.

Two things about leaders surprise people.

At a glance

Abilitylearndash/manage-group-leaders
ToolsetLearnDash — toolset/learndash
GroupLearnDash › Groups
RequiresAcrossAI Pro, plus LearnDash LMS active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Pro 0.9.16 and later

How it works

The first is that leading a group does not grant the leader the group’s course access. A leader who should also take the courses needs adding as a member too, through learndash/manage-group-membership.

That separation is correct — a manager overseeing a cohort is not necessarily a learner in it — and it routinely produces a leader who cannot open the course they are managing.

The second is the role. A leader normally needs the group_leader role to use their permissions at all, and adding somebody without it produces a leader who is recorded as one and can do nothing. The response warns when that happens.

This is incremental. Pass add and remove as arrays; anything you do not mention is left alone. That makes a single change a single call, and it means a caller cannot wipe a list by sending a short one.

What a leader may actually do beyond that is site settings rather than anything set here, so two sites with identical leader lists can behave very differently.

Idempotent.

Input

NameTypeRequiredWhat it is
group_idintegerYesThe group.
addarrayNoUser IDs, logins or emails to make leaders.
removearrayNoUser IDs, logins or emails to remove as leaders.

What comes back

NameTypeWhat it is
leadersarrayThe leaders afterwards.
warningsarrayAnybody added without the group_leader role.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Make this person a leader of the cohort.

It resolves to one call:

{
  "ability": "learndash/manage-group-leaders",
  "parameters": {
    "group_id": 700,
    "add": ["manager@example.com"]
  }
}

Worth knowing

  • Leading does not grant course access. Add them as a member too if they need it.
  • Without the group_leader role the permissions do not apply — and you are warned.
  • What a leader may do is site settings, not this call.
  • Incremental.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading