Pman/Login.php
authoredward <edward@roojs.com>
Mon, 15 Jan 2018 08:25:11 +0000 (16:25 +0800)
committeredward <edward@roojs.com>
Mon, 15 Jan 2018 08:25:11 +0000 (16:25 +0800)
Pman/Login.php

index 4670415..a596f75 100644 (file)
@@ -264,7 +264,7 @@ class Pman_Login extends Pman
             //DB_DataObject::DebugLevel(1);
             $e = DB_DataObject::Factory('Events');
             $e->action = 'LOGIN-BAD';
-            $e->ipaddr = $_SERVER['REMOTE_ADDR'];
+            $e->ipaddr = $ip;
             $e->whereAdd('event_when > NOW() - INTERVAL 10 MINUTE');
             if ($e->count() > 5) {
                 $this->jerror('LOGIN-RATE', "Login failures are rate limited - please try later");
@@ -508,6 +508,9 @@ class Pman_Login extends Pman
             return;
         }
         
+        $core_ip_access->sendXMPP();
+        exit;
+        
         if(empty($core_ip_access->status)){
             $this->jerr('PENDING-IP-ADDRESS', array('ip' => $ip));
         }