Support

Account

Home Forums General Issues Display Name and role using a user field Reply To: Display Name and role using a user field

  • John,
    As you may have already noticed, I’m very amateur on this šŸ™
    I’ve made that change and get the same error message.

    Here’s the code:

    <h3>Asistentes</h3>
    <div>	
      <?php $users = get_field('asistentes'); ?>
    <ul>
    <?php foreach ($users as $user): ?>
    <li>
     <p><?php echo $user['display_name']; 
          echo 'User roles: ' . implode(', ', $user_info['role']) . "\n";?></p>
    </li>
    <?php endforeach; ?>
    </div>

    This is line 38, which triggers the error:
    echo 'User roles: ' . implode(', ', $user_info['role']) . "\n";?></p>

    Any further solution?
    Thanks a lot!