includes/class-freemius.php
private function update_user_name() {
            $this->_logger->entrance();
            $name = fs_request_get( 'fs_user_name_' . $this->get_unique_affix(), '' );

            $api  = $this->get_api_user_scope();
            $user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,first,last", 'put', array(
                'name' => $name,
            ) );

            if ( ! isset( $user->error ) ) {
                $this->_user->first = $user->first;
                $this->_user->last  = $user->last;
                $this->_store_user();
            } else {
                // handle different error cases.

            }

            return $user;
        }
private function update_user_name() {
            $this->_logger->entrance();
            $name = fs_request_get( 'fs_user_name_' . $this->get_unique_affix(), '' );

            $api  = $this->get_api_user_scope();
            $user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,first,last", 'put', array(
                'name' => $name,
            ) );

            if ( ! isset( $user->error ) ) {
                $this->_user->first = $user->first;
                $this->_user->last  = $user->last;
                $this->_store_user();
            } else {
                // handle different error cases.

            }

            return $user;
        }
private function update_user_name ( ) { $ this -> _logger -> entrance ( ) ; $ name = fs_request_get ( 'fs_user_name_' . $ this -> get_unique_affix ( ) , '' ) ; $ api = $ this -> get_api_user_scope ( ) ; $ user = $ api -> call ( "?plugin_id={$this->_plugin->id}&fields=id,first,last" , 'put' , array ( 'name' => $ name , ) ) ; if ( ! isset ( $ user -> error ) ) { $ this -> _user -> first = $ user -> first ; $ this -> _user -> last = $ user -> last ; $ this -> _store_user ( ) ; } else { // handle different error cases.
 } return $ user ; }
Handle user name update.

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

@return object
Handle user name update .