User tests: Successful: Unsuccessful:
This PR extends the user:add CLI command to support assigning user groups either by name (as before) or by numeric ID (new).
The --usergroup option now accepts:
• a group name (e.g. "Super Users")
• a group ID (e.g. 8)
• or a comma-separated list of mixed values (e.g. "2,8,Registered")
Each value is internally checked:
• If it’s numeric and matches an existing ID → accepted
• If it matches an existing group name → accepted
• Otherwise → error
This provides a more flexible developer and automation experience, especially when working with provisioning tools.
Example CLI calls (all valid now):
php cli/joomla.php user:add \ --username="cliadmin" \ --password="Sup3rS3cur3_P4ssw0rt!" \ --email="stefan.wendhausen@community.joomla.org" \ --name="CLI User" \ --usergroup="8"
php cli/joomla.php user:add --username=test1 --password=abc123 --email=test1@community.joomla.org --name="Test User" --usergroup="8"
php cli/joomla.php user:add --username=test2 --password=abc123 --email=test2@community.joomla.org --name="Test User" --usergroup="Super Users"
php cli/joomla.php user:add --username=test3 --password=abc123 --email=test3@community.joomla.org --name="Test User" --usergroup="2,3"
php cli/joomla.php user:add --username=test4 --password=abc123 --email=test4@community.joomla.org --name="Test User" --usergroup="Registered,Author,8"
The parameter --usergroup
does not work with a user group ID.
An ID for a user group is accepted and the user is created.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-6.0-dev
|
I have tested this item ✅ successfully on 9dcc28b
I'm wondering that ShortcutPlugin.cy.js
failed three times when running Drone, in both System Tests; but it is passes local test (single and overall System Tests, HTTP and HTTPS in Docker container). Checking the System Tests log (simple to download) shows PHP Warning was found:
> [Fri May 30 16:46:26.805419 2025] [php:warn] [pid 51:tid 51] [client 127.0.0.1:45938] PHP Warning: Undefined array key "status" in /tests/www/cmysql/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php on line 598, referer: https://localhost/cmysql/administrator/index.php
This code was introduced with PR 45143.
@laoneo Checking the logs is working 😄
@SniperSister Could you please take a look at this and give a fix in 5.4 so we can upmerge this in 6.0?
@richard67 fyi, we have the same issue in 5.4
Update: Fix is already in work:
The system test failure is unrelated from this PR and will be fixed in #45547
@tecpromotion Just a small nudge to get this over the line, then we can get tests arranged.