Title: Undefined variable: visitor_location
Last modified: August 30, 2016

---

# Undefined variable: visitor_location

 *  [Jan Zikmund](https://wordpress.org/support/users/verify/)
 * (@verify)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-visitor_location/)
 * Hi, in plugin version 2.0 I cannot login to admin, as I am getting error **Notice:
   Undefined variable: visitor_location in /home/rainware/public_html/new/wp-content/
   plugins/user-login-log/user-login-log.php on line 372**
 * On that line #372 is $guest_ip = $visitor_location[‘IP’];
    while $visitor location
   is not defined. I believe this line can safely be removed, as on line #386 the
   ip is stored as ‘ip’ => isset($_SERVER[‘HTTP_X_FORWARDED_FOR’]) ? esc_sql($_SERVER[‘
   HTTP_X_FORWARDED_FOR’]) : esc_sql($_SERVER[‘REMOTE_ADDR’]),
 * and the $guest_ip is not used at all. Can you confirm if that is correct and 
   perhaps fix it in the next version.
 * Thanks, cheers
    Jan
 * [https://wordpress.org/plugins/user-login-log/](https://wordpress.org/plugins/user-login-log/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Weblizar – WordPress Themes & Plugin](https://wordpress.org/support/users/weblizar/)
 * (@weblizar)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-visitor_location/#post-6571402)
 * Hello jan,
 * Thanks for point out us of error.
 * We will test it and try to resolve it in next update.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Undefined variable: visitor_location’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-login-log_97949d.svg)
 * [User Login Log](https://wordpress.org/plugins/user-login-log/)
 * [Support Threads](https://wordpress.org/support/plugin/user-login-log/)
 * [Active Topics](https://wordpress.org/support/plugin/user-login-log/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-login-log/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-login-log/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Weblizar – WordPress Themes & Plugin](https://wordpress.org/support/users/weblizar/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-visitor_location/#post-6571402)
 * Status: not resolved