I created a simple plug-in (function override) to do this for my internal site. The code is based on the code found on another thread which I have modified.
I think a better approach might be to change the userhandle map that links "user id" to the "handle" that's displayed throughout the application but I don't think that function can be overridden so it would have been a more involved change that I wasn't prepared to do.
I overrode qa_get_one_user_html() in the qa-app-users.php (Q2A 1.5.2) include file using an override plugin...
replacing this:
with this:
$userprofiles = qa_db_select_with_pending(qa_db_user_profile_selectspec($handle,false));
$userdisplayhandle = $handle;
if(@$userprofiles['name'] != '')
{
$userdisplayhandle = @$userprofiles['name'];
}
return strlen($userdisplayhandle) ? ('<A HREF="'.
qa_path_html('user/'.$handle).'" CLASS="qa-user-link'.
($microformats ? ' url nickname' : '').'">'.qa_html($userdisplayhandle).
'</A>') : '';
This approach does have its issues:
1) It won't update all locations where the username is displayed. It does update the user list, the question list and the question pages. It does not update the user profile / account pages (which I don't necessarily think is a bad thing, since that's where you would see your userid).
2) It will break some plugins that look for the username found in the userhandle map. One example of this is the Badges plugin by NoahY. Its not a bug in his code, its the way my change modifies what his code is looking for to display the badge widget. I've fixed that issue locally - without the fix, the badge widget just doesn't display for users who's full name is displayed instead of their userhandle.
Note, I'm doing this because we implemented a custom SSO for our site and wanted to give users the flexability to change their user id (a generic alpha-numeric string in our case) to show a custom name that people can more easily recognize.