User tests: Successful: Unsuccessful:
Pull Request to add a new Model + View for Users/User to the front-end.
Note: this PR is an improved version of #24799
It has been decoupled from Articles (the previous version showed (the number) of articles that a User had created).
The front-end does not have a model + view to display a list of Users.
You cannot use the back-end model of com_users in the front-end because that model has some authentication so that you cannot get data from the Users table if you are not logged in.
This PR adds a Front-end View + Model for Users and User.
The view can be added to the Front-end by creating a new menu item type "Users > List Users".
The Users View supports Custom Fields.
Create some Users that you assign to some User Group (e.g. Author and Editor).
In Menus > Main Menu, create a New Menu Item of type "Users > List Users"
Under the "Users View" tab, configure what the new menu item should display:
The Front-end should have a new View that displays a list of Users.
You should be able to navigate the list.
If you select a User, you should see the User page with currently only the name of the user:
The User View supports Custom Fields that have been added to the User.
For the moment you can display all other Fields (besides the Name it already displays) + Custom Fields them by creating a Template Override.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Front End com_users |
Labels |
Added:
?
?
|
I think the reason why this views are missing is security related.
I don't see a reason to make a list of users available on my sites frontend, that just screams for potential security issues
@joomla/security should have a look at this for sure.
What is your use case?
I understand your concerns. We have to double, triple, check that the views can only be used if they are made available on purpose, via a Menu Item.
So you won't just make a list of users available on you sites front-end:
Use cases
for me allow user admin in front is realy great addition !!!
mabe category creation can be perfect too
Re the links to users pages
http://localhost/joomla-cms/index.php/userlist?view=user&id=532
http://localhost/joomla-cms/index.php/userlist/nigel
I have tested this item
- Can there be an option for it to be a link or just plain text
Sorry, what do you mean?
- The users page link is not exactly sef
I expected more like
http://localhost/joomla-cms/index.php/userlist/nigel
Yeah, I understand your point.
However, to create such nice URLs (the last part), Joomla uses unique alias fields.
The alias field.is not available in the User Manager.
So when your site has two Nigels, all links to people with the same name (Nigel) will go to the 1st Nigel in the database :-)
I have tested this item
Great feature. I always wondered why there wasn't a list of users views on the frontend.
I have tested this item
Great feature. I always wondered why there wasn't a list of users views on the frontend.
Labels |
Added:
?
|
Well right now it seems that this PR lacks the basic template functionallity that displays the user information. Profile fields and User custom fields. It's a bit barebones right now if clicking on an user shows nothing but just its name.
So when your site has two Nigels, all links to people with the same name (Nigel) will go to the 1st Nigel in the database :-)
Not true, you can use the username, the username is unique
This hasn't been discussed either way as far as I know. It's something that came up in my London User Group like this but with custom fields etc.
Tbh I wouldn't prioritise this right now. It's not something we are going to have in 4.0 at this stage as we're focussed on the beta blockers. Until a 4.1 branch is set up where this would probably be a viable feature there's not a huge amount of point in focussing on this.
I have some GDPR concerns when a registered user can't block the display of its data in front-end. Whatever it is.
But I'm no jurist.
Does this show user articles?
I have some GDPR concerns when a registered user can't block the display of its data in front-end.
Why? The user data is already available in the website and visible in the back-end.
As long as you are transparent about the usernames becoming visible for other users (e.g. in privacy statement and a message on the registration form), I don't see issues with that.
What is missing is a unique user alias (#__users change, router change, method to create unique alias based on username / name / ???) that needs to be added to the user table. the alias is needed for creating unique url's. Without this, this will technical work but not from a user / seo perspective.
Does this show user articles?
No, my previous PR did have that option: #24799
This PR is more generic and makes it possible to create a template override that displays the users articles..
Maybe not for right now but that's the main thing I see missing from Joomla! if you want to create a blog. That's the main purpose I see for this pull request. And decoupling com_contact makes it more user friendly.
Again, offering a PR that displays an empty profile unless people create a template override is not useful. At that point users would not creating a template override
, they would create the template period. There needs to be some data displayed by default in the default template.
Also again, this regarding the SEO usernames:
you can use the username, the username is unique
Again, offering a PR that displays an empty profile unless people create a template override is not useful.
I do not agree with that. The purpose of this PR is to make the User Model available in the front-end. Currently you can only display a list of users or display a single user using a non-core component.
When this PR is added to the Joomla core, the User Model can be used in the front-end and then other functionality can be added on top of that (e.g. a list of articles written by that user). First with using a template override. Or we can extend the functionality with a new PR later.
Also again, this regarding the SEO usernames:
you can use the username, the username is unique
until a user put's in an email address as username: get ready for the trolls :) so there should definitely be some conversions.
Also all com_users back-end views should be adjusted to make the alias possible / editable
For the username to be used as an alias it would need to be sanitised by using the same functionality we already have for this.
That sucks. Can somebody else pick it up?
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-01 16:21:16 |
Closed_By | ⇒ | roland-d | |
Labels |
Added:
Conflicting Files
?
?
?
Removed: ? |
@roland-d @Quy @AndySDH I had git-out-of-sync issues with my local installation + my Joomla-CMS fork.
As I had submitted my code already as PR to Joomla-cms, I removed my Joomla-cms fork on github and reforked.
I have not updated my PR because of all the discussions in this PR I have a feeling it is not wanted.
And it would probably not be added in 4.0 #25030 (comment)
If there's demand for my feature and there is more possibility that it will get merged, then I am willing to redo it.
But I don't want to spend time into something that won't be merged anyway.
Well if it won't be merged in 4.0, it would definitely come in 4.1, it's a great feature for sure!
I would love to see this in the core.
But I don't want to spend time into something that won't be merged anyway.
Too bad about the energy, you are already a long way towards realization.
Thanks for your corrections @brianteeman
I've fixed it with commit ac4d027