alleyinteractive / alleyinteractive/wp-light-sessions

Add a filterable logout route

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
PHP
Stelle
4
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Description

I would like to see this plugin add a filterable logout route which would expose a URL which would destroy the light session cookies and redirect the user somewhere. Proposed features:

* Register a rewrite for a login route. Ideally, the path would be filterable and might have a default like `/logout/` or similar.
* When a user visits the logout route, the light session cookies set by this plugin should be destroyed.
* An action should be fired so that the implementing site can optionally perform additional tasks (like destroying additional cookies which may have been set for the user).
* The user should be redirected to a filterable location, with a default of the home page.
* If the user was a WordPress user, they should instead be redirected to `wp_logout_url()` with the redirect set to the above.

### Use Case

Using the WordPress Logout URL for light sessions does seem to work, but it prompts users to confirm the logout (as WordPress does when the nonce isn't correct) and that seems unnecessary for light session users.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.