diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-08-24 06:29:10 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-08-24 06:29:10 +0000 |
commit | 591b54daac0d95c51f4f4dd986f68e3523baf9dd (patch) | |
tree | 1e4cce73262d1ac45d6d29e96fc37928aec8bb41 /lib/class | |
parent | 62bfa3c932b7b982bfd5b746cfd83445f57e1d4d (diff) | |
download | ampache-591b54daac0d95c51f4f4dd986f68e3523baf9dd.tar.gz ampache-591b54daac0d95c51f4f4dd986f68e3523baf9dd.tar.bz2 ampache-591b54daac0d95c51f4f4dd986f68e3523baf9dd.zip |
fix the prevent_multiple_logins (Thx hugh)
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/vauth.class.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/class/vauth.class.php b/lib/class/vauth.class.php index c6189250..7bf4d16c 100644 --- a/lib/class/vauth.class.php +++ b/lib/class/vauth.class.php @@ -543,7 +543,8 @@ class vauth { if (Config::get('prevent_multiple_logins')) { $client = new User($results['id']); $current_ip = $client->is_logged_in(); - if ($current_ip != sprintf("%u",ip2long($_SERVER['REMOTE_ADDR']))) { + if ($current_ip AND $current_ip != sprintf("%u",ip2long($_SERVER['REMOTE_ADDR']))) { + debug_event('Login','Concurrent Login Failure, attempted to login from ' . $_SERVER['REMOTE_ADDR'] . ' and already logged in','1'); Error::add('general','User Already Logged in'); return false; } |