[4.2] Message after a login / logout frontend
Pull Request for Issue # .
New feature, see #30767
Summary of Changes
There is a message after a successfully login and logout in the frontend.
Messages
[EDIT] Removed successfully from the text in message.
Users: Options

Testing Instructions
Backend: Go to Users > Manage > Options (Frontend: Is not applicable.)
Set the options:
- Frontend Login Message (= Yes, default = No)
- Frontend Logout Message (= Yes, default = No)
Create a menu link:
- Menu Login form
- Menu Logout form
- Log in and out, in case of a:
- Login form (default)
- Menu Login form
- Menu Logout form
- Code review (developers);
- Check if the code is correct and secure.
Actual result BEFORE applying this Pull Request
There is NOT showing a message after a suscessfully login or logout.
Expected result AFTER applying this Pull Request
- There is showing a message after a suscessfully login.
- There is showing a message after a suscessfully logout.
Documentation Changes Required
Yes.
Please rebase on 4.1-dev
Please rebase on 4.1-dev
It's just a small extension, a new feature might be a bit exaggerated. Or is there some other argument?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on 963ad7deca4ef06a722b95009dac832fa42b7a98
I have tested the patch and it works perfectly
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on 963ad7deca4ef06a722b95009dac832fa42b7a98
Tested successfully on Joomla 4.0.0-beta5-dev and PHP 7.3.22-1
Thank you!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
i'll not set this PR as RTC despite 2 good tests cause of https://github.com/joomla/joomla-cms/pull/30834#issuecomment-701965397 i'll let the final decision to RL's
We might as well all go home if this wont get merged
Some checks were not successful: continuous-integration/drone/pr — Build is failing
What does this mean? Action?
[EDIT] I see that this problem has resolved itself.
We might as well all go home if this wont get merged
We have 27 release blocker and most of the time I only see some new stuff if no one fixes the release blocker and only add new fancy stuff then you are right and we can go home. https://github.com/joomla/joomla-cms/issues?q=is%3Aopen+is%3Aissue+label%3A"Release+Blocker"
We have 27 release blocker and most of the time I only see some new stuff if no one fixes the release blocker and only add new fancy stuff then you are right and we can go home.
I will close this PR and make a new PR based on [4.1].
You don't need to, I changed your target branch to 4.1-dev
You don't need to, I changed your target branch to 4.1-dev
I see it has already happened. :smiley:
Thanks.
Please rebase on 4.1-dev
Please test in Joomla [4.1].
@maikol-ortigueira / @pabloarias
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on 91ccc4f8401bbb4c22c0c07caae855812d173839
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on 91ccc4f8401bbb4c22c0c07caae855812d173839
Nice addition @sandewt. Too many times have I not realised I was logged in or out when wanting to be the reverse after clicking the button in J3.
Testing scenarios all worked.
Please add Documentation Required tag so that it can be noted to go back and review relevant help and JDocs.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I really like the feature (good idea) but I'm not sure about the parameter tbh. Is it needed at all? Perhaps we should (in a future version) go for a message management extension where all this notifications can be managed on one point? Any thoughts?
What kind of message management extension are you looking for? Shouldt a module / plugin / component take care of its own messages?
Something like the mail templates?
Yes exactly.
I have tested this item :white_check_mark: successfully on 91ccc4f8401bbb4c22c0c07caae855812d173839
I have tested this item.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on 91ccc4f8401bbb4c22c0c07caae855812d173839
Its showing a message on login and logout on frontend.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
Thanks all.
Again: I would merge it, but I think the parameter are not necessary. We should avoid to add parameter for each thing (yeah I know we did it in the past very often...). If someone want to disable the messages, he/she/it can just make a language override to an empty string.
Additionally I don't think it's necessary to check if user is really logged in, otherwise the login/logout would have returned before, so you can assume, they are.
Could you adjust the PR for this?
Again: I would merge it, I would merge it, but I think the parameter are not necessary.
Sorry, I read about this. Do you mean both parameters? For now I would like to leave it that way, until there is a centrally regulated message system. Or if several want it that way.
Additionally I don't think it's necessary to check if user is really logged in, otherwise the login/logout would have returned before, so you can assume, they are.
You mean?
Change this code:
// Show a message when a user is logged in.
if ($login === 1 && Factory::getUser()->get('id') > 0)
to:
// Show a message when a user is logged in.
if (ComponentHelper::getParams('com_users')->get('frontend_login_message', 0))
{
Do you mean both parameters?
Yes both parameters.
If someone want to disable the messages, he/she/it can just make a language override to an empty string.
I have the following notes:
- Not everyone likes a login / outlog message and can get irritated by it. Hence the default parameters are hide.
- Especially novice users of Joomla are often unfamiliar with overrides.
Additionally I don't think it's necessary to check if user is really logged in, otherwise the login/logout would have returned before, so you can assume, they are.
Done. Deleted check if user is logged in
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on ce1bf617029d4b3ffd244a0f223d74ec78c1f78e
It's working fine.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
I have tested this item :white_check_mark: successfully on ce1bf617029d4b3ffd244a0f223d74ec78c1f78e
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30834.
@sandewt please remove the parameters they are unneeded and using the override component should be possible with documentation thx