Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration model doesn't create correct messages on failed registration email #8900 #9885

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/com_users/models/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,15 +589,15 @@ public function register($temp)
// Send a system message to administrators receiving system mails
$db = $this->getDbo();
$query->clear()
->select($db->quoteName(array('name', 'email', 'sendEmail', 'id')))
->select($db->quoteName('id'))
->from($db->quoteName('#__users'))
->where($db->quoteName('block') . ' = ' . (int) 0)
->where($db->quoteName('sendEmail') . ' = ' . (int) 1);
$db->setQuery($query);

try
{
$sendEmail = $db->loadColumn();
$userids = $db->loadColumn();
}
catch (RuntimeException $e)
{
Expand All @@ -606,12 +606,12 @@ public function register($temp)
return false;
}

if (count($sendEmail) > 0)
if (count($userids) > 0)
{
$jdate = new JDate;

// Build the query to add the messages
foreach ($sendEmail as $userid)
foreach ($userids as $userid)
{
$values = array(
$db->quote($userid),
Expand Down