includes/class-freemius.php
private function complete_change_owner() {
            $this->_logger->entrance();

            $site_result = $this->get_api_site_scope( true )->get();
            $site        = new FS_Site( $site_result );
            $this->_site = $site;

            $user     = new FS_User();
            $user->id = fs_request_get( 'user_id' );

            // Validate install's user and given user.
            if ( $user->id != $this->_site->user_id ) {
                return false;
            }

            $user->public_key = fs_request_get( 'user_public_key' );
            $user->secret_key = fs_request_get( 'user_secret_key' );

            // Fetch new user information.
            $this->_user = $user;
            $user_result = $this->get_api_user_scope( true )->get();
            $user        = new FS_User( $user_result );
            $this->_user = $user;

            $this->_set_account( $user, $site );

            return true;
        }
private function complete_change_owner() {
            $this->_logger->entrance();

            $site_result = $this->get_api_site_scope( true )->get();
            $site        = new FS_Site( $site_result );
            $this->_site = $site;

            $user     = new FS_User();
            $user->id = fs_request_get( 'user_id' );

            // Validate install's user and given user.
            if ( $user->id != $this->_site->user_id ) {
                return false;
            }

            $user->public_key = fs_request_get( 'user_public_key' );
            $user->secret_key = fs_request_get( 'user_secret_key' );

            // Fetch new user information.
            $this->_user = $user;
            $user_result = $this->get_api_user_scope( true )->get();
            $user        = new FS_User( $user_result );
            $this->_user = $user;

            $this->_set_account( $user, $site );

            return true;
        }
private function complete_change_owner ( ) { $ this -> _logger -> entrance ( ) ; $ site_result = $ this -> get_api_site_scope ( true ) -> get ( ) ; $ site = new FS_Site ( $ site_result ) ; $ this -> _site = $ site ; $ user = new FS_User ( ) ; $ user -> id = fs_request_get ( 'user_id' ) ; // Validate install's user and given user.
 if ( $ user -> id != $ this -> _site -> user_id ) { return false ; } $ user -> public_key = fs_request_get ( 'user_public_key' ) ; $ user -> secret_key = fs_request_get ( 'user_secret_key' ) ; // Fetch new user information.
 $ this -> _user = $ user ; $ user_result = $ this -> get_api_user_scope ( true ) -> get ( ) ; $ user = new FS_User ( $ user_result ) ; $ this -> _user = $ user ; $ this -> _set_account ( $ user , $ site ) ; return true ; }
Handle install ownership change.

@author Vova Feldman (@svovaf)
@since  1.1.1
@uses   FS_Api

@return bool Was ownership change successfully complete.
Handle install ownership change .