Joomla GSoC 18 with Alexandra Ciobica

Hi again! I’m back to tell you what’s going on with the “Enhance Users Component” project. :)

In this post I’ll write about what are the new features in the users component and about my work so far. The project had advanced pretty well, we now have two new views in the users component. One of them displays a list of users in a group and the other one displays the details of a user. I have also included custom fields in the views.

List view:

alexandra blog 2 1

Details view:

alexandra blog 2 2

The views take into consideration the view access level of the current user so that if someone who doesn’t have permissions to view a user in list, this user is not displayed in the list. For the details view, if the user wants to access a link for the details of a user that they can’t access, an error will be displayed instead of the details.

In order to get to the list view, there is a new option, when creating a menu item, named “User List”. When selecting this option, the user gets the option to select the group of users to be displayed.
Below there are the menu options (picture 1) and the view where the user can select the details of the menu item and the group (picture 2).

alexandra blog 2 3
alexandra blog 2 4

More, I added the routing of the component so that the links that are displayed are SEO friendly links. Now when I go to a user detail view with the name ”Mimi Nedelea” in a menu item named “Registered users list”, the link looks like this: /index.php/registered-users-list/411-mimi-nedelea.

Now I’m going to write about some of the difficulties I have come across and some tricks that, for a newbie, are very helpful.

First, I needed an extra package in the project and when doing composer install a lot of other packages that shouldn’t be committed were added. My first reaction was to delete everything, but that was not a good option because I deleted some needed files. So, if you do a package install, there is a git command you can write to get rid of all dev packages that you do not need that is composer install --no-dev (thank you Allon).

Next, if out of the blue when you go to your installed Joomla site you get the installing screen, look for the configuration.php in the root of your project, because that might be the reason why this happens. And to resolve it ask a friend for the file and modify your email and the database details and you are done.

Last, sometimes when doing a pull request in the repo there might be some code style checks that are failing and are not shown in your IDE. In this case you can go to terminal and write libraries/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla. Don’t forget the “.” This command runs the code style checks locally.

That’s all for now.