(05-13-2018, 05:21 PM)demilson Wrote: Hi Brandin!
It seems I achieved the solution. Just added the following in the file custom_login_script.php and a user wont be able to login in more than one time simultaneously. To test: open a session in one device and, then, try to login another session (same user, of course) from another device or even from an browser private navigation window.
<?php
//Whatever you put here will happen after the username and password are verified and the user is "technically" logged in, but they have not yet been redirected to their starting page. This gives you access to all the user's data through $user->data()
$db->query("UPDATE us_user_sessions SET UserSessionEnded=1,UserSessionEnded_Time=NOW() WHERE UserSessionEnded=0 AND fkUserID=?", [$_SESSION['user']]);
Redirect::to($us_url_root.'users/account.php');
?>
......
Here i'm again:
I'm trying the latest US version, great improvements!
My only complaint: I found the mod I had implemented to not allow more than one session open simultaneously isn't working anymore. I just tried adding the above code as I did before in the custom_login_script.php file.
Isn't it compatible anymore?
Thank you!
Demilson