BUG 14102 "La tabla LOGIN_LOG almacena el ip errado." SOLVED
- La tabla LOGIN_LOG almacena el ip errado - Problema resuelto, se registra el ip utilizando el metodo getIpAddress(). Disponible para la versió.5.3 de ProcessMaker.
This commit is contained in:
@@ -177,7 +177,7 @@ class G
|
|||||||
* getIpAddress
|
* getIpAddress
|
||||||
* @return string $ip
|
* @return string $ip
|
||||||
*/
|
*/
|
||||||
public function getIpAddress ()
|
public static function getIpAddress ()
|
||||||
{
|
{
|
||||||
if (getenv( 'HTTP_CLIENT_IP' )) {
|
if (getenv( 'HTTP_CLIENT_IP' )) {
|
||||||
$ip = getenv( 'HTTP_CLIENT_IP' );
|
$ip = getenv( 'HTTP_CLIENT_IP' );
|
||||||
|
|||||||
@@ -195,12 +195,10 @@ try {
|
|||||||
|
|
||||||
/**log in table Login**/
|
/**log in table Login**/
|
||||||
require_once 'classes/model/LoginLog.php';
|
require_once 'classes/model/LoginLog.php';
|
||||||
$g = new G();
|
|
||||||
|
|
||||||
$weblog=new LoginLog();
|
$weblog=new LoginLog();
|
||||||
$aLog['LOG_UID'] = G::generateUniqueID();
|
$aLog['LOG_UID'] = G::generateUniqueID();
|
||||||
$aLog['LOG_STATUS'] = 'ACTIVE';
|
$aLog['LOG_STATUS'] = 'ACTIVE';
|
||||||
$aLog['LOG_IP'] = $g->getIpAddress();
|
$aLog['LOG_IP'] = G::getIpAddress();
|
||||||
$aLog['LOG_SID'] = session_id();
|
$aLog['LOG_SID'] = session_id();
|
||||||
$aLog['LOG_INIT_DATE'] = date('Y-m-d H:i:s');
|
$aLog['LOG_INIT_DATE'] = date('Y-m-d H:i:s');
|
||||||
//$aLog['LOG_END_DATE'] = '0000-00-00 00:00:00';
|
//$aLog['LOG_END_DATE'] = '0000-00-00 00:00:00';
|
||||||
|
|||||||
Reference in New Issue
Block a user