Repository navigation
|
I understand why you're adding a token to any form, but why a logout link? This is really a problem... Is there a preference for this to be set off? How to fix the code like this? Yes, I found that I can now add a special link in sitelinks, but this is a hardcoded link. And sometimes there is no logout link in the page content (no signin, no login menu, no navigation link). How to log out now? Only idea I have is to put this on the login.php page somehow, because that is available. Thanks |
Replies: 1 comment 4 replies
|
@Jimmi08 Čau Jimako, In your snippet, add the token to the link, the same way core's own logout links carry it: <a href='".e_BASE."index.php?logout&e-token=".defset('e_TOKEN')."' class='dropdown-item ai-icon'>Nothing else in the block changes. The login menu builds its link exactly like that ( Why logout needs one. Anybody can fire a plain There's no preference to turn it off. Pages with no logout link at all. Two routes that need no PHP:
I traced all of this in the code rather than trying it on a site. |



@Jimmi08: I'm asking @e107help to demonstrate a logout confirmation page like what Drupal made. This should be more user-friendly than the current implementation, which is this error message:
The logout CSRF protection is to prevent the nuisance of logging out when the user doesn't intend to. Over the years, major sites have added this form of logout protection, and I believe it is best practice for e107 to do this as well. (For example, Google previously resisted fixing
<img src="https://accounts.google.com/Logout">, bu…