I have a made application over WordPress for premium user where user can see page after logging into his account.

but there is issue that same user can login form multiple computer, so I want to make function for the user session, when user login in WordPress then expires all other sessions,

By this way I can prevent miss use of my WordPress application.

I want a function that would make only one current active session.

1
1

has been updated because don’t need to write function, only use wp_destroy_all_other_sessions function with initlike this

add_action('init', 'wp_destroy_all_other_sessions');

Developed its plugin and publish on WordPress Download here :One Active session

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *