I have this following code that is printing twice the user group. Thanks in advance.
<?php
$terms = array();
$terms_tags = get_the_terms( $current_user->ID, array( 'user-group' ) );
foreach ( $terms_tags as $term_tag ) {
$terms[$term_tag->slug] = $term_tag->name;
echo $term_tag->slug. ' ';
}
?>