How can I show the contents of only a few users

To show content only for users with role ‘agent’, try to use this snippet:

<?php if ( ( $user = wp_get_current_user() ) && in_array( 'agent', $user->roles ) ) { ?>
    ///here the content
<?php } ?>

If you want to block users by ID, check the following snippet:

<?php if ( ( $user = wp_get_current_user() ) && in_array( 'agent', $user->roles ) && in_array( $user->ID, array( 8, 9 ) ) ) { ?>
    ///here the content
<?php } ?>

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