Skip Navigation

[Resuelto] Create a user active session control

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
The issue here is that the user wanted to limit the number of active sessions that a logged in user can have.

Solution:

Unfortunately we are not able to assist with this since it is not a part of what our plugins can do and would require custom code to achieve.

However I was doing some searching and was able to find this plugin here.
https://wordpress.org/plugins/loggedin/

This support ticket is created hace 6 años, 7 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Etiquetado: 

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por rafaelE-3 hace 6 años, 7 meses.

Asistido por: Shane.

Autor
Mensajes
#687939

I need to control the number of active sessions opened by the same user. (On different browsers)

I have created a post type called "sessions" and two fields on this called "usuario" and "active_session".

What I want is to create a new "session" entry, each time a user logs in to the website like this:
-> usuario: 6 active_sessions: 1

And then, delete the last entry, each time the users with the user_id=6 logs out.

Then, I will add all the entries with the same user id with a view and compare that value with another stored on a custom field. If it is greater than that value I will redirect the user to a page telling him to close one of the other sessions to continue...

I was expecting to use the wp_login and wp_logout hook to to this, bu t I don't know how to create the code to make it works.
Can you help me to do something like this?

Thanks in advance!

#688187

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Rafael,

Thank you for contacting our support forum.

Unfortunately we are not able to assist with this since it is not a part of what our plugins can do and would require custom code to achieve.

However I was doing some searching and was able to find this plugin here.
https://wordpress.org/plugins/loggedin/

It should be able to assist you with doing this.

Thanks,
Shane

#690618

I tried this plugin before asking for support, but it doesn't worked for me.
I will find other solution.
Thanks!