Password-Link missing in Welcome-Mail

When I create a new user without setting a password, there is no password link in the welcome mail.
I was looking in /nextcloud/apps/settings/lib/Mailer/NewUserMailHelper.php but without any programming skills I cannot figure anything out.

Nextcloud version (eg, 20.0.5): 26.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52 (Ubuntu)
PHP version (eg, 7.4): PHP 8.1.2-1ubuntu2.11

Steps to replicate it:

  1. automatic welcome mail after user creation
  2. manually resending welcome mail

EDIT: when I use the “forgot password” function, the password link is created correctly.
So basically it seems to work

Hey all,

the problem is solved!

A change by mistake of the file /nextcloud/apps/settings/lib/Mailer/NewUserMailHelper.php has led to the fact that the script no longer worked.
After a NC update the creation of the welcome mail is working correctly again.

When resending the welcome mail the password link is still missing. But this seems to be the normal behavior.