Introduce user session commands#3307
Conversation
| * ## EXAMPLES | ||
| * | ||
| */ | ||
| class User_Session_Command extends WP_CLI_Command { |
There was a problem hiding this comment.
Can we move this to its own file? user-session.php
|
@johnbillion FYI - the |
|
@johnbillion Do you have time committed to working on this, or should I finish it up? |
|
Yeah I have some other changes that I made. I'll implement your feedback and push it up. |
|
@johnbillion I'd like to get this landed. Last chance to push your changes, otherwise I'm going to take this forward. |
|
@danielbachhuber Just pushed my latest code. Feel free to carry on, otherwise I'll continue when I get some more time! |
|
Test for user session destroy. It may be helpful. :) https://gist.github.com/ernilambar/63a7e985f328d2171a799b182088fbdd |
@ernilambar Thanks! Really helpful :)
Given this is doable with |
Fixes #3306.
This is a work in progress. The commands mostly map to the available user session API functions.
TODO:
wp user session list <user>- List all sessions of a user.wp user session destroy-all <user>- Destroy all sessions of a user.wp user session destroy <user> <token>- Destroy the given session of a user.[ ]wp user session drop- Destroy all sessions of all users.list_().