Logout message using shield |
I've tried the following approaches in order to send a logout message to the login view while using CI4 Shield:
PHP Code: auth()->logout(); Also: PHP Code: auth()->logout(); But both didn't work. What is the standard procedure to do a logout while passing a logout message other than 'successLogout'?
Shield sets a logout message by default:
https://github.com/codeigniter4/shield/b...p#L99-L108 (08-06-2024, 06:19 PM)kenjis Wrote: Shield sets a logout message by default: Yeah! But is there (currently) any way to set another message other than 'successLogout'? If not I would like to propose this feature...
The messages used by Shield are inside Shield's Language folder, I guess you can edit the one that is not fitting your needs there? Or customise the view for the logout to something you want (inside the Config/Auth.php file)?
I haven't tried it but can't you just extend the controller and override the default logout
https://shield.codeigniter.com/customiza...ntrollers/
Create app/Language/{locale}/Auth.php to change the default message for Auth.successLogout:
PHP Code: <?php
Also, as you see, your code is correct and no problem.
So if you did't see your message, you did not run it properly.
How about custom routes? ? https://shield.codeigniter.com/customiza...te_config/
|
Welcome Guest, Not a member yet? Register Sign In |