Get attachments from a post

$post_attachment->post_author will return user ID. You need to fetch user details from user ID.

get_userdata( $userid );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)