includes/class-freemius.php
private function fetch_user_by_install() {
            $api = $this->get_api_site_scope();

            $uid          = $this->get_anonymous_id();
            $request_path = "/users/{$this->_site->user_id}.json?uid={$uid}";

            $result = $api->get( $request_path, false, WP_FS__TIME_10_MIN_IN_SEC );

            if ( $this->is_api_result_entity( $result ) ) {
                $user        = new FS_User( $result );
                $this->_user = $user;
                $this->_store_user();

                return $user;
            }

            $error_code = FS_Api::get_error_code( $result );

            if ( in_array( $error_code, array( 'invalid_unique_id', 'user_cannot_be_recovered' ) ) ) {
                /**
                 * Those API errors will continue coming and are not recoverable with the
                 * current site's data. Therefore, extend the API call's cached result to 7 days.
                 */
                $api->update_cache_expiration( $request_path, WP_FS__TIME_WEEK_IN_SEC );
            }

            return $result;
        }
private function fetch_user_by_install() {
            $api = $this->get_api_site_scope();

            $uid          = $this->get_anonymous_id();
            $request_path = "/users/{$this->_site->user_id}.json?uid={$uid}";

            $result = $api->get( $request_path, false, WP_FS__TIME_10_MIN_IN_SEC );

            if ( $this->is_api_result_entity( $result ) ) {
                $user        = new FS_User( $result );
                $this->_user = $user;
                $this->_store_user();

                return $user;
            }

            $error_code = FS_Api::get_error_code( $result );

            if ( in_array( $error_code, array( 'invalid_unique_id', 'user_cannot_be_recovered' ) ) ) {
                /**
                 * Those API errors will continue coming and are not recoverable with the
                 * current site's data. Therefore, extend the API call's cached result to 7 days.
                 */
                $api->update_cache_expiration( $request_path, WP_FS__TIME_WEEK_IN_SEC );
            }

            return $result;
        }
private function fetch_user_by_install ( ) { $ api = $ this -> get_api_site_scope ( ) ; $ uid = $ this -> get_anonymous_id ( ) ; $ request_path = "/users/{$this->_site->user_id}.json?uid={$uid}" ; $ result = $ api -> get ( $ request_path , false , WP_FS__TIME_10_MIN_IN_SEC ) ; if ( $ this -> is_api_result_entity ( $ result ) ) { $ user = new FS_User ( $ result ) ; $ this -> _user = $ user ; $ this -> _store_user ( ) ; return $ user ; } $ error_code = FS_Api :: get_error_code ( $ result ) ; if ( in_array ( $ error_code , array ( 'invalid_unique_id' , 'user_cannot_be_recovered' ) ) ) { /**
                 * Those API errors will continue coming and are not recoverable with the
                 * current site's data. Therefore, extend the API call's cached result to 7 days.
                 */ $ api -> update_cache_expiration ( $ request_path , WP_FS__TIME_WEEK_IN_SEC ) ; } return $ result ; }
Special user recovery mechanism.

@author Vova Feldman (@svovaf)
@since  2.0.0

@return \FS_User|mixed
Special user recovery mechanism .