Conflicting Files ? ? ? ? ? Failure

User tests: Successful: Unsuccessful:

avatar pe7er
pe7er
28 May 2019

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).

Summary of Changes

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.

Testing Instructions

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"

joomla-users1

Under the "Users View" tab, configure what the new menu item should display:

  • User Groups: select a few
  • Select if you want to see the Page Header or not
  • Configure if you want to see the Last Visit date of that User
  • Configure the Date Format if you want to show it differently
  • Configure if you want to see the Online status of that User

joomla-users2

Expected result

The Front-end should have a new View that displays a list of Users.
You should be able to navigate the list.

joomla-users3

If you select a User, you should see the User page with currently only the name of the user:

joomla-users4

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.

avatar pe7er pe7er - open - 28 May 2019
avatar pe7er pe7er - change - 28 May 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 May 2019
Category Administration Language & Strings Front End com_users
avatar pe7er pe7er - change - 28 May 2019
Labels Added: ? ?
avatar pe7er
pe7er - comment - 29 May 2019

Thanks for your corrections @brianteeman
I've fixed it with commit ac4d027

avatar Bakual
Bakual - comment - 29 May 2019

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?

avatar pe7er
pe7er - comment - 29 May 2019

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:

  • the Lists will only show if a Menu Item has been created.
  • the Menu Item of a list of Users can be set to Registered

Use cases

  • Magazine websites - Categories + Articles are already in Joomla. Display a list of all Authors (Users that are in the "Author" User Group) is not possible without using a 3rd party extensions. It would be great if we could display a list of selected users with just the Joomla core. We would like to have that functionality for https://magazine.joomla.org/
  • Association + Portal websites - Can display a list of their Members (including Custom Fields like Photo, membership, social media links, etc) to their own Members using a Menu Item of type Registered
  • Other case - With a template override you could hide any Personal Data that is now available in the Users table, and only show the Custom Fields that the Users can add themselves. In that case this new front-end User Model is only used to navigate between those Custom Fields.
avatar micker
micker - comment - 29 May 2019

for me allow user admin in front is realy great addition !!!
mabe category creation can be perfect too

avatar bembelimen
bembelimen - comment - 29 May 2019

JFYI to not repeat all arguments: #21441

avatar brianteeman
brianteeman - comment - 29 May 2019

@pe7er and I discussed that PR during jday nl and this is very different. It is not hardcoded to be connected to com_contacts. It doesn't duplicate existing functionality and it actually works and is testable

avatar brianteeman
brianteeman - comment - 3 Jun 2019

Re the links to users pages

  1. Can there be an option for it to be a link or just plain text
  2. The users page link is not exactly sef
    example
    http://localhost/joomla-cms/index.php/userlist?view=user&id=532
    I expected more like
    http://localhost/joomla-cms/index.php/userlist/nigel
avatar tushar33 tushar33 - test_item - 19 Oct 2019 - Tested successfully
avatar tushar33
tushar33 - comment - 19 Oct 2019

I have tested this item successfully on 7103b3b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25030.

avatar pe7er
pe7er - comment - 19 Oct 2019
  1. Can there be an option for it to be a link or just plain text

Sorry, what do you mean?

  1. 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 :-)

avatar anibalsanchez anibalsanchez - test_item - 3 Nov 2019 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 3 Nov 2019

I have tested this item successfully on 7103b3b

Great feature. I always wondered why there wasn't a list of users views on the frontend.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25030.

avatar anibalsanchez
anibalsanchez - comment - 3 Nov 2019

I have tested this item successfully on 7103b3b

Great feature. I always wondered why there wasn't a list of users views on the frontend.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25030.

avatar Quy Quy - change - 3 Nov 2019
Labels Added: ?
avatar richard67
richard67 - comment - 10 Mar 2020

@wilsonge Is there anything speaking against this PR beside the conflicts? E.g. any PLT decision not to want that? If not, then @pe7er could solve the conflicts, if necessary we test again and then it could go RTC.

avatar AndySDH
AndySDH - comment - 11 Mar 2020

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.

avatar AndySDH
AndySDH - comment - 11 Mar 2020

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

avatar wilsonge
wilsonge - comment - 12 Mar 2020

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.

avatar ReLater
ReLater - comment - 14 Mar 2020

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.

avatar uglyeoin
uglyeoin - comment - 16 Mar 2020

Does this show user articles?

avatar pe7er
pe7er - comment - 16 Mar 2020

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.

avatar pe7er
pe7er - comment - 16 Mar 2020

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..

avatar Ruud68
Ruud68 - comment - 16 Mar 2020

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.

avatar uglyeoin
uglyeoin - comment - 16 Mar 2020

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.

avatar AndySDH
AndySDH - comment - 16 Mar 2020

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

avatar pe7er
pe7er - comment - 16 Mar 2020

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.

avatar Ruud68
Ruud68 - comment - 16 Mar 2020

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

avatar brianteeman
brianteeman - comment - 16 Mar 2020

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.

avatar roland-d
roland-d - comment - 1 Aug 2020

@pe7er Any interest in fixing the conflicts and picking this up or should the PR be closed?

avatar Quy
Quy - comment - 1 Aug 2020

@roland-d The branch is deleted so I assume he is no longer interested.

avatar AndySDH
AndySDH - comment - 1 Aug 2020

That sucks. Can somebody else pick it up?

avatar roland-d
roland-d - comment - 1 Aug 2020

@Quy Thanks for that, I missed the deleted branch. In that case I will close this pull request and if someone else is interested they can pick this up in a new pull request.

avatar roland-d roland-d - change - 1 Aug 2020
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: ?
avatar roland-d roland-d - close - 1 Aug 2020
avatar AndySDH
AndySDH - comment - 1 Aug 2020

Nobody will ever see or notice this again if the pull request gets closed. @roland-d

avatar roland-d
roland-d - comment - 1 Aug 2020

@AndySDH We cannot keep PR's open forever. This PR being buried at page 1234 is not noticeable either. If we ever get to the point where we have a plan of what should be in which release, we could make a "job board" with features for people to work on.

avatar Quy
Quy - comment - 1 Aug 2020

@AndySDH There are two open issues #26973 & #28294 referencing this PR.

avatar pe7er
pe7er - comment - 2 Aug 2020

@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.

avatar AndySDH
AndySDH - comment - 2 Aug 2020

Well if it won't be merged in 4.0, it would definitely come in 4.1, it's a great feature for sure!

avatar laoneo
laoneo - comment - 1 Jun 2022

I would love to see this in the core.

avatar sandewt
sandewt - comment - 28 Jan 2023

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.

Add a Comment

Login with GitHub to post a comment