summaryrefslogtreecommitdiffstats
path: root/lib/class/user.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-07 06:51:52 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-07 06:51:52 +0000
commitbd270b02274b4e43a887e86805a44cf456f2da38 (patch)
tree8accb5ce9cbccd2f051eb271f9daa30c589e0fc2 /lib/class/user.class.php
parent84b483c99a32452dc53b9b77fdf818c710bcd5d3 (diff)
downloadampache-bd270b02274b4e43a887e86805a44cf456f2da38.tar.gz
ampache-bd270b02274b4e43a887e86805a44cf456f2da38.tar.bz2
ampache-bd270b02274b4e43a887e86805a44cf456f2da38.zip
fixed the acl issue... sigh
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r--lib/class/user.class.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index ad5c20f3..ceeb7332 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -547,14 +547,17 @@ class User {
* address at this time in this place, doing this thing.. you get the point
*/
public function insert_ip_history() {
+
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
- $sip = $_SERVER['HTTP_X_FORWARDED_FOR'];
- debug_event('User Ip', 'Login from ip adress: ' . $sip,'3');
- } else {
- $sip = $_SERVER['REMOTE_ADDR'];
- debug_event('User Ip', 'Login from ip adress: ' . $sip,'3');
+ $sip = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ debug_event('User Ip', 'Login from ip adress: ' . $sip,'3');
+ }
+ else {
+ $sip = $_SERVER['REMOTE_ADDR'];
+ debug_event('User Ip', 'Login from ip adress: ' . $sip,'3');
}
- $ip = ip2long($sip);
+
+ $ip = sprintf("%u",ip2long($sip));
$date = time();
$user = $this->id;