⚠️ This issue respects the following points: ⚠️
Bug description
Newly created users no longer receive the welcome email automatically. But email seems to work fine anywhere else :
- Sending a test email from the SMTP settings works
- Clicking "Resend welcome email" works
The issue was discovered after the following this Helm upgrade path (but i believe that it is not the source of problem):
6.6.10 (Nextcloud 30.0.17) -> 7.0.1 (Nextcloud 31.0.1) -> 8.9.1 (Nextcloud 32.2.7) -> 9.0.3 (Nextcloud 33.0.0)
This was not tested on a fresh install, only on an upgraded instance.
It looks like the upgrade may have changed the core:newUser.sendEmail value in oc_appconfig from yes/no to 1, which causes the checks for === 'yes' to fail and disables the automatic sending of the welcome email when a user is created.
SELECT *
FROM oc_appconfig
WHERE appid = 'core';
-- After upgrade to Nextcloud 33:
core | newUser.sendEmail | 1
-- On Nextcloud 30:
core | newUser.sendEmail | yes
This seems to disable the automatic email trigger because the code compares the config value to the string 'yes'.
for occ command (core/Command/User/Add.php) (line 183) :
if ($this->appConfig->getValueString('core', 'newUser.sendEmail', 'yes') === 'yes') {
for web ui (apps/provisioning_api/lib/Controller/UsersController.php) (line 593) :
if ($this->config->getAppValue('core', 'newUser.sendEmail', 'yes') === 'yes') {
Quick fix :
for occ command (core/Command/User/Add.php) (line 183)
if ($this->appConfig->getValueBool('core', 'newUser.sendEmail', true)) {
for web ui (apps/provisioning_api/lib/Controller/UsersController.php) (line 593) :
if ($this->config->getAppValue('core', 'newUser.sendEmail', 'yes') === '1')
Steps to reproduce
From web ui :
- Go to Account page
- Click Account management settings
- Check that "Send welcome email to new accounts" is on
- Create a new user with the email field filled
Or from occ command :
- sudo -u www-data php occ user:add jdoe --email example@xyz.com --generate-password
Expected behavior
A newly created user should automatically receive the welcome email when the feature is enabled, just as before the upgrade.
Nextcloud Server version
33
Operating system
None
PHP engine version
PHP 8.4
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
{
"system": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"overwriteprotocol": "https",
"objectstore": {
"class": "\\OC\\Files\\ObjectStore\\S3",
"arguments": {
"bucket": ***REMOVED SENSITIVE VALUE***,
"region": ***REMOVED SENSITIVE VALUE***,
"hostname": ***REMOVED SENSITIVE VALUE***,
"port": "443",
"storageClass": "STANDARD",
"objectPrefix": "urn:oid:",
"autocreate": false,
"use_ssl": true,
"use_path_style": false,
"legacy_auth": false,
"key": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***"
}
},
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpsecure": "ssl",
"mail_smtpauth": true,
"mail_smtpauthtype": "LOGIN",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"upgrade.disable-web": true,
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "33.0.1.2",
"overwrite.cli.url": "https:\/\/localhost",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"defaultapp": "files",
"maintenance": false,
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
***REMOVED SENSITIVE VALUE***
],
"twofactor_enforced_excluded_groups": [
***REMOVED SENSITIVE VALUE***
],
"log_type": "file",
"logfile": "nextcloud.log",
"log_type_audit": "file",
"logfile_audit": "audit.log",
"loglevel": 0,
"lost_password_link": "disabled",
"default_language": "fr",
"openmetrics_allowed_clients": [
***REMOVED SENSITIVE VALUE***
]
}
}
List of activated Apps
Enabled:
- admin_audit: 1.23.0
- app_api: 33.0.0
- bruteforcesettings: 6.0.0-dev.0
- cloud_federation_api: 1.17.0
- contactsinteraction: 1.14.1
- dav: 1.36.0
- federatedfilesharing: 1.23.0
- federation: 1.23.0
- files: 2.5.0
- files_downloadlimit: 5.1.0-dev.0
- files_pdfviewer: 6.0.0-dev.0
- files_sharing: 1.25.2
- files_trashbin: 1.23.0
- files_versions: 1.26.0
- geoblocker: 0.5.20
- groupfolders: 21.0.6
- impersonate: 4.0.0
- logreader: 6.0.0
- lookup_server_connector: 1.21.0
- oauth2: 1.21.0
- ownershiptransfer: 1.4.0
- password_policy: 5.0.0-dev.0
- profile: 1.2.0
- provisioning_api: 1.23.0
- serverinfo: 5.0.0-dev.0
- settings: 1.16.0
- systemtags: 1.23.0
- text: 7.0.0-dev.3
- theming: 2.8.0
- theming_customcss: 1.20.0
- twofactor_admin: 4.11.1
- twofactor_backupcodes: 1.22.0
- twofactor_totp: 15.0.0-dev.0
- updatenotification: 1.23.0
- user_status: 1.13.0
- viewer: 6.0.0-dev.0
- webhook_listeners: 1.5.0
- workflowengine: 2.15.0
Disabled:
- activity: 6.0.0-dev.0 (installed 3.0.0)
- circles: 33.0.0 (installed 30.0.0)
- comments: 1.23.0 (installed 1.20.1)
- dashboard: 7.13.0 (installed 7.10.0)
- encryption: 2.21.0
- files_external: 1.25.1
- files_reminders: 1.6.0 (installed 1.3.0)
- firstrunwizard: 6.0.0-dev.0 (installed 3.0.0)
- nextcloud_announcements: 5.0.0 (installed 2.0.0)
- notifications: 6.0.0 (installed 3.0.0)
- photos: 6.0.0-dev.0 (installed 3.0.2)
- privacy: 5.0.0-dev.0 (installed 2.0.0)
- recommendations: 6.0.0-dev.0 (installed 3.0.0)
- related_resources: 4.0.0-dev.0 (installed 1.5.0)
- sharebymail: 1.23.0 (installed 1.20.0)
- support: 5.0.0 (installed 2.0.0)
- survey_client: 5.0.0-dev.0 (installed 2.0.0)
- suspicious_login: 11.0.0-dev.0
- testing: 1.23.0
- twofactor_nextcloud_notification: 7.0.0
- user_ldap: 1.24.0
- weather_status: 1.13.0 (installed 1.10.0)
Nextcloud Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results
=======
- core
- EXTRA_FILE
- nextcloud.log
- audit.log
Raw output
==========
Array
(
[core] => Array
(
[EXTRA_FILE] => Array
(
[nextcloud.log] => Array
(
[expected] =>
[current] => 5b2ca3ed1cf1f284bf69428819e482190b2365dfc30e365c9c0e3f7ec908e11dacb61e4106772a39823e49e19025d9b0145844da5cbecd4b4211bbc98d703ccc
)
[audit.log] => Array
(
[expected] =>
[current] => 63819ff5f21785b95c7289dac6a8b372b42af834ef2593de297997d50aa67f869fd6928043d5fa85784acdc9c91194ba2743cc13e78054ef9c0ebbae849a2654
)
)
)
)
Nextcloud Logs
No log entry of the problem because the condition was not trigered at all
Additional info
In the debug i also tried to change the value type of newUser.sendEmail to string but it broke the webapp making it throw error 500:
sudo -u www-data php occ config:app:set core newUser.sendEmail --value=yes --type string
Bug description
Newly created users no longer receive the welcome email automatically. But email seems to work fine anywhere else :
The issue was discovered after the following this Helm upgrade path (but i believe that it is not the source of problem):
6.6.10(Nextcloud30.0.17) ->7.0.1(Nextcloud31.0.1) ->8.9.1(Nextcloud32.2.7) ->9.0.3(Nextcloud33.0.0)This was not tested on a fresh install, only on an upgraded instance.
It looks like the upgrade may have changed the
core:newUser.sendEmailvalue inoc_appconfigfromyes/noto1, which causes the checks for=== 'yes'to fail and disables the automatic sending of the welcome email when a user is created.This seems to disable the automatic email trigger because the code compares the config value to the string 'yes'.
for occ command (core/Command/User/Add.php) (line 183) :
for web ui (apps/provisioning_api/lib/Controller/UsersController.php) (line 593) :
Quick fix :
for occ command (core/Command/User/Add.php) (line 183)
for web ui (apps/provisioning_api/lib/Controller/UsersController.php) (line 593) :
Steps to reproduce
From web ui :
Or from occ command :
Expected behavior
A newly created user should automatically receive the welcome email when the feature is enabled, just as before the upgrade.
Nextcloud Server version
33
Operating system
None
PHP engine version
PHP 8.4
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
{ "system": { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "overwriteprotocol": "https", "objectstore": { "class": "\\OC\\Files\\ObjectStore\\S3", "arguments": { "bucket": ***REMOVED SENSITIVE VALUE***, "region": ***REMOVED SENSITIVE VALUE***, "hostname": ***REMOVED SENSITIVE VALUE***, "port": "443", "storageClass": "STANDARD", "objectPrefix": "urn:oid:", "autocreate": false, "use_ssl": true, "use_path_style": false, "legacy_auth": false, "key": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***" } }, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpsecure": "ssl", "mail_smtpauth": true, "mail_smtpauthtype": "LOGIN", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "upgrade.disable-web": true, "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "33.0.1.2", "overwrite.cli.url": "https:\/\/localhost", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "instanceid": "***REMOVED SENSITIVE VALUE***", "installed": true, "defaultapp": "files", "maintenance": false, "twofactor_enforced": "true", "twofactor_enforced_groups": [ ***REMOVED SENSITIVE VALUE*** ], "twofactor_enforced_excluded_groups": [ ***REMOVED SENSITIVE VALUE*** ], "log_type": "file", "logfile": "nextcloud.log", "log_type_audit": "file", "logfile_audit": "audit.log", "loglevel": 0, "lost_password_link": "disabled", "default_language": "fr", "openmetrics_allowed_clients": [ ***REMOVED SENSITIVE VALUE*** ] } }List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No log entry of the problem because the condition was not trigered at allAdditional info
In the debug i also tried to change the value type of newUser.sendEmail to string but it broke the webapp making it throw error 500:
sudo -u www-data php occ config:app:set core newUser.sendEmail --value=yes --type string