You can change the attribute of user object fetched. Best example for this hook usage is the DisplayUsernames component https://www.opensource-socialnetwork.org/component/view/3065/display-username

~~~
<?php
function com_display_username_init(){
ossn_add_hook('user', 'get', 'com_display_username_replace_fullname_by_username');
}
function com_display_username_replace_fullname_by_username($hook, $type, $return, $params){
$return->fullname = $return->username;
return $return;
}
ossn_register_callback("ossn", "init", "com_display_username_init");
~~~

User fetched object