nextcloud / nextcloud/server

[LDAP] Send welcome mail for new users from LDAP/AD backend

Open
#63,460 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: ldap team: IDP
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

[!TIP]

Help move this idea forward
  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.
Currently, when new users are synchronized or provisioned via the LDAP/AD backend (user_ldap), Nextcloud does not trigger welcome emails. While local users created via the UI or Provisioning API can automatically receive a welcome email based on the core app configuration newUser.sendEmail, LDAP users are completely excluded from this onboarding flow.

As an administrator, there is no out-of-the-box way to inform newly synced LDAP users that their account is ready to use, forcing admins to rely on custom scripts or external mailings.

Describe the solution you'd like
Support the existing newUser.sendEmail for newly mapped LDAP users.

  1. When a new user is created from user_ldap, check if newUser.sendEmail is set to yes.
  2. Trigger a welcome email that dynamically adapts to read-only backends. If a user belongs to a backend that does not support password changes, the welcome email should omit the "Set your password" link/token and instead inform the user that they can log in using their standard LDAP/AD credentials.

Describe alternatives you've considered

  • Keep as-is, users are not directly informed.
  • Manually click "re-send welcome mail"

Additional context

  • none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing new-user creation in the user_ldap backend and the existing core newUser.sendEmail flow used by local users and the Provisioning API. Check how the re-send welcome mail handles password-setting links and read-only backends. Done means newly mapped LDAP users receive the configured welcome mail, with password instructions matching their backend capabilities.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.