DataObjects/Core_notify.php
[Pman.Core] / DataObjects / Events.php
index 0e7cc98..05b5f67 100644 (file)
@@ -283,6 +283,10 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
         $this->person_id = $au ? $au->id : -1;
         $this->person_table = $au ? $au->tableName() : '';
         $this->ipaddr = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : 'cli';
+        if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+            $this->ipaddr = $_SERVER['HTTP_X_FORWARDED_FOR'];
+        }
+        
         $this->action = $act;
         $this->on_table = $obj ? $obj->tableName() : '';
         $pk = $obj ? $obj->keys()  : false;
@@ -383,7 +387,7 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
         
         // Remove all the password from logs...
         $p =  empty($_POST) ? array() : $_POST;
-        foreach(array('passwd', 'password', 'passwd2', 'password2') as $rm) {
+        foreach(array('passwd', 'password','passwd1',  'passwd2','password1', 'password2') as $rm) {
             if (isset($p[$rm])) {
                 $p[$rm] = '******';
             }