joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.69k stars 3.63k forks source link

[5.2] Consistency: Users (front-end) - Front-end Overview + Single User view #43614

Open pe7er opened 1 month ago

pe7er commented 1 month ago

Joomla is used for all kinds of websites. It is also great for magazine websites with articles and authors, association websites with members, portals with users, etc. However, currently in the Joomla front-end you cannot display lists of users without 3rd party extensions.

We would like to have:

In a lot of cases you could create a template override, add some code to get data from a model. In case of com_users you cannot use the back-end model in the front-end. To access the com_users back-end model you'll need some authentication so that only works for registered users who are logged in. Therefore we would like to include front-end models in com_users.

Some years ago I created a PR for this for Joomla 4 which was closed. Maybe some parts of the code can be re-used: https://github.com/joomla/joomla-cms/pull/25030

The following are guidelines for what we would like to see in a front-end Users Overview and Single User View for com_users.

Users Overview

Adding a menu item for Users Overview

A new "Users List" or "List Users" view should be created: menu-item-type

The menu item edit should have an option to select one or more User Groups, and an option to exclude single users from the overview. The example below shows a multiple select option. It would be better to use the "fancy select" for both fields to make it easier to add multiple groups/users. menu-item-edit2

Front-end view of User Overview

The front-end User Overview should display some columns with information. The columns should be configurable in the menu item. The Names of the user should link to an individual User page. front-end-users-overview

Adding a menu item for Single User

A new "Single User" view should be created, just like the "Users List" view above. The menu item should have some options to display or hide User details (by default: hide)

Single User View

front-end-single-users

In some cases, like with a magazine website, it would be nice to display all articles written by a "Contributor". For that a separate module "Content by User" can be created. That way the Single User page can be a sort of place holder for other (3rd party) modules that are specific for that user.

brianteeman commented 4 weeks ago

Wouldnt this be the same as using the existing contact creator plugin and then displaying a list of contacts#?

brianteeman commented 4 weeks ago

Also pretty sure that displaying a list of individual users to exclude will be a massive performance issue on a site with a lot of users. We've seen that before for relatively small lists such as when we tried to display a select list of all folders in the media plugins

pe7er commented 4 weeks ago

Wouldnt this be the same as using the existing contact creator plugin and then displaying a list of contacts#?

No, I know the contract creator plugin. And the contract creator plugin workaround is not what we want:

Instead, we want to create views using the existing data (no duplicates) and make these views more flexible by making it possible to display the Custom Fields currently already available in Users.

pe7er commented 4 weeks ago

Also pretty sure that displaying a list of individual users to exclude will be a massive performance issue on a site with a lot of users. We've seen that before for relatively small lists such as when we tried to display a select list of all folders in the media plugins

True! We could consider a different approach: Instead of displaying a massive list of users, we could add functionality to com_users that allows us to display or hide individual users. And in the new front-end view in com_users we would only display users who aren't set to hidden. That way we could avoid those performance issues.

brianteeman commented 4 weeks ago

Looking at the previous PR (which I never understood why you closed it) I see a reference to an RFC you also created - in that RFC it says it was being taken to the production dept for a decision. https://github.com/joomla/rfc/pull/19#issuecomment-741891351 Was that ever done?

brianteeman commented 4 weeks ago

As for the exclusions I would do this by usergroup not by user. For example on one of my sites I have two parallel usergroups "public members" and "private members"