Plugin Directory

Changeset 1667062


Ignore:
Timestamp:
05/30/2017 12:35:35 PM (9 years ago)
Author:
Off Site Services
Message:

Tested up to: 4.7.5

Location:
owasp-user-location-check/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • owasp-user-location-check/trunk/checker.php

    r1320895 r1667062  
    55 * Description: Sends warning notification to user’s email if someone logs in to user’s account from another country within 2 hours of last login session.
    66 * Author URI: http://oss-usa.com
    7  * Version: 0.1
     7 * Version: 0.2
    88 * Licence: GPLv2
    99 */
    1010
     11function checkerUserChecking () {
     12    if ( is_user_logged_in() ) {
    1113
    12 function userChecking () {
    13     if ( is_user_logged_in() ) {
    14 //
    15         function getIp () {
     14        function checkerGetIp () {
    1615            if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
    1716                return $ip = $_SERVER['HTTP_CLIENT_IP'];
     
    2423
    2524        $user_id = get_current_user_id();
    26         $userIp = getIp();
     25        $userIp = checkerGetIp();
    2726        $details = json_decode(file_get_contents("http://ipinfo.io/{$userIp}"));
    2827        $currentCountry = $details->country;
     
    8281
    8382
    84 add_action('wp_head', 'userChecking');
    85 add_action('admin_head', 'userChecking');
     83add_action('wp_head', 'checkerUserChecking');
     84add_action('admin_head', 'checkerUserChecking');
  • owasp-user-location-check/trunk/readme.txt

    r1398149 r1667062  
    55Tags: OWASP security, OWASP location check, OWASP login validation, security, wordpress security, user country check, user location check, change user location
    66Requires at least: 3.0.1
    7 Tested up to: 4.5
    8 Stable tag: 0.1
     7Tested up to: 4.7.5
     8Stable tag: 0.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.