Changeset 1667062
- Timestamp:
- 05/30/2017 12:35:35 PM (9 years ago)
- Location:
- owasp-user-location-check/trunk
- Files:
-
- 2 edited
-
checker.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
owasp-user-location-check/trunk/checker.php
r1320895 r1667062 5 5 * 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. 6 6 * Author URI: http://oss-usa.com 7 * Version: 0. 17 * Version: 0.2 8 8 * Licence: GPLv2 9 9 */ 10 10 11 function checkerUserChecking () { 12 if ( is_user_logged_in() ) { 11 13 12 function userChecking () { 13 if ( is_user_logged_in() ) { 14 // 15 function getIp () { 14 function checkerGetIp () { 16 15 if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 17 16 return $ip = $_SERVER['HTTP_CLIENT_IP']; … … 24 23 25 24 $user_id = get_current_user_id(); 26 $userIp = getIp();25 $userIp = checkerGetIp(); 27 26 $details = json_decode(file_get_contents("http://ipinfo.io/{$userIp}")); 28 27 $currentCountry = $details->country; … … 82 81 83 82 84 add_action('wp_head', ' userChecking');85 add_action('admin_head', ' userChecking');83 add_action('wp_head', 'checkerUserChecking'); 84 add_action('admin_head', 'checkerUserChecking'); -
owasp-user-location-check/trunk/readme.txt
r1398149 r1667062 5 5 Tags: OWASP security, OWASP location check, OWASP login validation, security, wordpress security, user country check, user location check, change user location 6 6 Requires at least: 3.0.1 7 Tested up to: 4. 58 Stable tag: 0. 17 Tested up to: 4.7.5 8 Stable tag: 0.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.