![]() |
only one login allowed at a time - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 2.x (https://forum.codeigniter.com/forumdisplay.php?fid=18) +--- Thread: only one login allowed at a time (/showthread.php?tid=62233) |
only one login allowed at a time - prodip56 - 06-22-2015 i want to contrall my users. so i want to only one login allowed at a time per userid. any body help me about this. RE: only one login allowed at a time - BeYourCyber - 07-02-2015 I did not know which authenticate module you are already use. But concept of your requirement is : 1) when login store user id and time in some table OR mark expire time in your user's table. 2) when login go to check 1) that have record or it already expire or not if no > reject new login. (You need decision this condition to kick current user or reject new login user if reject new login you need to wait current user expire). 3) every time when user have activity on site update time to 1) data OR write AJAX to check user every X minutes (in case you want to reduce expire time than fix time). |