If user is Admin or another role

If I understand you correctly, you want to determine if the user has any role that is in some pre-defined list like this: $accepted_roles = array( ‘administrator’, ‘editor’, ); if ( ! empty( array_intersect( $accepted_roles, $user->roles ) ) ) { …

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