Skip to content

[Bug] Do not send Notification Email to anonymous user #22068

@peterbo

Description

@peterbo

What happened?

If users are created from a plugin (e.g. OIDC), the system sends user creation notifications to the anonymous user (anonymous@example.org).

What should happen?

Do not send Emails to the anonymous user.

How can this be reproduced?

Use a plugin, that internally creates users, e.g. OIDC or SAML. If you watch the smtp log on the server, you can see, that there is an email send to the anonymous user's email address, which is anonymous@example.org by default.
This seems to be the reason - if not a user, but the system itself creates a user, it falls back to anonymous:

matomo/core/Piwik.php

Lines 251 to 259 in 1eebd5d

public static function getCurrentUserLogin()
{
$login = Access::getInstance()->getLogin();
if (empty($login)) {
return 'anonymous';
}
return $login;
}

Matomo version

all

PHP version

No response

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions