This question is refining the poorly asked Is there any easy way to set the default author for a node being edited to the current author if it is currently anonymous?
The site I'm working on has a lot of Anonymous nodes because it is a migration from a system that didn't have a proper user system. Users can claim their articles (they have permission via the override node options module) by going in and editing the node and changing the system author.
I'd like the default value on the edit form for node owner to be the current user for non-admin users who are editing a node that was not owned by anyone previously. I'm sure it must be imminently doable through some form alter or form preprocess hook, but I don't quite get the drupal form system yet. Solutions and pointers to good sources of information both welcome. My ulterior motive in this question is to learn more about how to use hook_form_alter to change the values of fields on the form, and particularly the owner field, so answers related to that are preferred.