Title: Upgrade Error
Last modified: August 21, 2016

---

# Upgrade Error

 *  Resolved [metaphorcreations](https://wordpress.org/support/users/metaphorcreations/)
 * (@metaphorcreations)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/upgrade-error-22/)
 * I just updated this plugin on a multisite install and it crashes my site along
   with this error:
 * Fatal error: Call to undefined function is_user_logged_in() in /home/califpt1/
   public_html/wp-content/plugins/better-wp-security/modules/free/hide-backend/class-
   itsec-hide-backend.php on line 213
 * Not sure why is_user_logged_in() is coming up as an undefined function…
 * [https://wordpress.org/plugins/better-wp-security/](https://wordpress.org/plugins/better-wp-security/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Dalitou](https://wordpress.org/support/users/dalitou/)
 * (@dalitou)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/upgrade-error-22/#post-5005233)
 * Open the file class-itsec-hide-backend.php you will see a function “filter_login_url”
 *     ```
       if ( ! is_user_logged_in() && ( ( defined( 'FORCE_SSL_LOGIN' ) && FORCE_SSL_LOGIN === true ) || ( defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN === true ) ) && $_SERVER['REQUEST_SCHEME'] === 'http' ) {
   
       			return $url;
   
       		} else {
   
       			return str_replace( 'wp-login.php', $this->settings['slug'], $url );
   
       		}
       ```
   
 * **I’m not sur** but maybe your server is not set for an ssl connection. I have
   the same problem, so i write this
    `public function filter_login_url( $url ) {
 *  return $url;
 *  }`
 * And I don’t have the error message anymore and i can acces to my site.
 *  [Zmesnjavc](https://wordpress.org/support/users/zmesnjavc/)
 * (@zmesnjavc)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/upgrade-error-22/#post-5005236)
 * Hi,
 * did you just replace the code : if ( ! is_user_logged_in() && …..
    …. return 
   str_replace( ‘wp-login.php’, $this->settings[‘slug’], $url );
 *  }
 * With the:
 *     ```
       public function filter_login_url( $url ) {
   
       return $url;
   
       }
       ```
   
 * Or did you need to change anything else? I am not a programer, but I need to 
   fix the website asap and i do not know what to do..
 *  [Chris Wiegman](https://wordpress.org/support/users/chriswiegman/)
 * (@chriswiegman)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/upgrade-error-22/#post-5005244)
 * Fixed in 4.2.13.
 *  Thread Starter [metaphorcreations](https://wordpress.org/support/users/metaphorcreations/)
 * (@metaphorcreations)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/upgrade-error-22/#post-5005248)
 * Thanks, Dalitou. That did the trick.
 * Zmesnjavc, yes, just replace (or comment out) everything within the “filter_login_url”
   function:
 *     ```
       if ( ! is_user_logged_in() && ( ( defined( 'FORCE_SSL_LOGIN' ) && FORCE_SSL_LOGIN === true ) || ( defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN === true ) ) && $_SERVER['REQUEST_SCHEME'] === 'http' ) {
   
       	return $url;
   
       } else {
   
       	return str_replace( 'wp-login.php', $this->settings['slug'], $url );
   
       }
       ```
   
 *  and replace it with :
 * `return $url;`

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Upgrade Error’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 4 replies
 * 4 participants
 * Last reply from: [metaphorcreations](https://wordpress.org/support/users/metaphorcreations/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/upgrade-error-22/#post-5005248)
 * Status: resolved