ensure user can only be logged in on one computer at a time?

how can i make sure a user can only be logged in on one computer at a time? I want to make a wordpress site that could potentially have paid accounts for content in the future. Is there anything built into wordpress that prevents a user from being logged in more than once?

Related posts

Leave a Reply

4 comments

  1. A simple way could be hooking into the login process and check if the user is already logged.

    There is a ‘wp_authenticate’ action that runs just before loggin in an user.

  2. As a follow up to @Daniel Dvorkin Answer: I guess you could “simply” hook two functions. One that is fired on login and another one triggered on logout. In both cases you could add some user meta data: logged in/out. If someone is checked in and checks in another time, you will already know in your login action.