Since only logged in users should be able to update a page, the updated_by_name field should always be set. If not through the edit form, then at least by a call to AuthUser::getUserName()

If no user is logged in according to AuthUser, you shouldn't even be able to reach this function.