Skip to content

Registration emails sent to admins regardless of 'block' status #13177

@bassmanpaul

Description

@bassmanpaul

On looking through Joomla's registration model I can see 2 instances where admin emails are collected in order to send notifications to. It looks like the query needs to be checking the user's block state otherwise registration notification emails will be sent to users who are blocked.

There is a 3rd instance that is correctly checking the block state which suggests the others need to perform this check as well.

The incorrect lines in question are:
https://github.com/joomla/joomla-cms/blob/staging/components/com_users/models/registration.php#L137
https://github.com/joomla/joomla-cms/blob/staging/components/com_users/models/registration.php#L580

The correct version is:
https://github.com/joomla/joomla-cms/blob/staging/components/com_users/models/registration.php#L621

The missing where clause being:

->where($db->quoteName('block') . ' = ' . (int) 0)

I can create a pull request and add the missing clauses if it needs updating and that would help?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions