• Resolved Murat Karag?z

    (@muratkaragoz46)


    Please, replace this at kaya-login-notification\lib\functions.php with

    `/**
     * Get the IP address of the client.
     *
     * @since 1.2.0
     *
     * @return string
     */
    if (!function_exists('wpkln_getClientIP'))
    {
    	function wpkln_getClientIP()
    	{
    		//cloudflare ip
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && filter_var($_SERVER['HTTP_CF_CONNECTING_IP'], FILTER_VALIDATE_IP)) 
    { 
    $clientIP = $_SERVER['HTTP_CF_CONNECTING_IP'];
    }
    		//cloudflare ip
    		
    		elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
    		{
    			$clientIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
    		}
    		elseif (!empty($_SERVER['HTTP_CLIENT_IP']))
    		{
    			$clientIP = $_SERVER['HTTP_CLIENT_IP'];
    		}
    		else
    		{
    			$clientIP = $_SERVER['REMOTE_ADDR'];
    		}
    		
    		return (filter_var($clientIP, FILTER_VALIDATE_IP) ? $clientIP : '');
    	}
    }`
    
Viewing 1 replies (of 1 total)
  • Plugin Author Kaya Studio

    (@kayastudio)

    Hello,
    Thank you for your contribution and for using ‘Kaya Login Notification’.

    I will check your modification and implement it to a futur update.

    Thank you, best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘cloudflare visitor ip’ is closed to new replies.