Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: How to add Logout link into menu? (Read 2244 times) previous topic - next topic

How to add Logout link into menu?

I'am trying to put logout link in menu area. This is the part of the code:

Code: [Select]
array(
'path' => 'index/logout?csrf_token='.Csrf::$token,
'label' => 'Exit',
'icon' => '<i class="fa fa-door"></i>'

But it's not working. Can someone help me?

 

Re: How to add Logout link into menu?

Reply #1
I just use a link pointing to "index/logout"


Re: How to add Logout link into menu?

Reply #3
I did experience somewhat a same issue.(localhost building)
 So I put into the htaccess file "rewritebase/myapp"
I enable the user authentication, found I was hindered with logging in and out during a test build so disabled that for the time being. experienced a blank screen in the build process when going to "review" in the interface, disabled authentication solved that too. Made sense on the test build authentication was last thing to enable and configuring rights for me. Once there Authentication enabled the users "My Account and Logout button was now in the Menu selection.
I found during that process the file "PageAccessManager.php" has the logic to handle the index file with logged in user.
Also I could quickly fine tune some access rights in that file as well,  of course editing after the build was completed since through the interface files will be overwritten if not deselected for overwrite. Maybe this helps.




Re: How to add Logout link into menu?

Reply #4
Error 403 means access forbidden. Please make sure you are passing the Crsf::$token to the logout link


Re: How to add Logout link into menu?

Reply #6
I'am trying to put logout link in menu area. This is the part of the code:

Code: [Select]
array(
'path' => 'index/logout?csrf_token='.Csrf::$token,
'label' => 'Exit',
'icon' => '<i class="fa fa-door"></i>'

But it's not working. Can someone help me?


Please what's not working on this?  This is supposed to work.