if user has a certain role then display image

In your template:

// rolename could for e.g. be 'editor' or 'author' or 'administrator'
author_can( get_the_ID(), 'rolename' ) AND print "<img src="https://wordpress.stackexchange.com/questions/56658/..." alt="A kool badge!" />";

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