No Code Attached Yet bug
avatar tecpromotion
tecpromotion
2 Nov 2026

What happened?

I came across this whilst testing another PR:
In Users: Edit, the toolbar shows Send Activation Reminder for a user who is blocked and has never logged in. Clicking it sends the mail "Your account has been activated by an administrator. You can now login …", but the account stays blocked and the login is denied.

Steps to reproduce

  1. Users: Manage → New. Fill in name, username, email and password, set User Status to Blocked, Save.
  2. The toolbar shows Send Activation Reminder.
  3. Click it. Message: "The user has been notified that their account has been activated."
  4. The user receives:

    Account activated for at

    Hello ,

    Your account has been activated by an administrator. You can now login at using the username and the password you chose while registering.

  5. Log in on the site with that username and password: "Login denied! Your account has either been blocked or you have not activated it yet." User Status is still Blocked.

Version

6.2

Expected result

No Send Activation Reminder for a blocked user without a pending activation. An admin blocked this account on purpose, so there is nothing to remind the user of. The "account activated" mail is not sent.

Actual result

The button is shown and the mail says the account is activated and the user can log in. The account is still blocked.

Image Image

System Information

Joomla 6.3.0-alpha1-dev (same code in 6.2-dev), PHP 8.3, MariaDB 11.8.

Additional Comments

The button is shown when activation is not empty or lastvisitDate is NULL (administrator/components/com_users/src/View/User/HtmlView.php, around line 199). block is not checked. UserModel::activate() uses the same condition to send the mail.

Possible fix (tested: no button for the blocked user, a direct user.active request sends no mail, a never-logged-in active user still gets the button):

--- a/administrator/components/com_users/src/View/User/HtmlView.php
+++ b/administrator/components/com_users/src/View/User/HtmlView.php
-        $userIsNotActive = !empty($this->item->activation) || \is_null($this->item->lastvisitDate);
+        $userIsNotActive = !empty($this->item->activation) || (\is_null($this->item->lastvisitDate) && !$this->item->block);
--- a/administrator/components/com_users/src/Model/UserModel.php
+++ b/administrator/components/com_users/src/Model/UserModel.php
                 if (empty($table->activation)) {
-                    if (\is_null($table->lastvisitDate)) {
+                    if (\is_null($table->lastvisitDate) && !$table->block) {
                         $sendMailTo($prevUserData);
                     }

Blocked users with a pending activation (activation not empty) still get Activate & Send Email, which unblocks them. The fix doesn't touch that path (not tested here).

avatar tecpromotion tecpromotion - open - 2 Nov 2026
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2026
Labels Added: No Code Attached Yet bug
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Nov 2026
avatar tecpromotion tecpromotion - change - 2 Nov 2026
Title
…
6.2] Users: "Send Activation Reminder" is shown for blocked users and tells them their account is activated
[6.2] Users: "Send Activation Reminder" is shown for blocked users and tells them their account is activated
avatar tecpromotion tecpromotion - edited - 2 Nov 2026
avatar brianteeman
brianteeman - comment - 4 Nov 2026

yes this seems to be a perfectly sensible proposal

Account state Expected behaviour
Pending activation Show Activate & Send Email
Active, never logged in Show Send Activation Reminder
Active, previously logged in No reminder
Blocked, never logged in No reminder
Blocked, previously logged in No reminder

Add a Comment

Login with GitHub to post a comment