Member Directory
Permalink
Hello!
I was hoping this was a quick fix, but for the life of me, I can't find it. I'm trying to get it where the member directory displays the users' email. I'm already displaying all custom user attributes, but I'm not seeing anyway to control the email. Thanks!
I was hoping this was a quick fix, but for the life of me, I can't find it. I'm trying to get it where the member directory displays the users' email. I'm already displaying all custom user attributes, but I'm not seeing anyway to control the email. Thanks!
Hey NetJunky!
I'm actually using the C5 single page for Member Directory so it's using a foreach loop to loop through the Public Profile attribute list. Here's the code:
I was thinking there was a way to do it through the dashboard. No?
I'm actually using the C5 single page for Member Directory so it's using a foreach loop to loop through the Public Profile attribute list. Here's the code:
foreach($users as $user) { if($user->getUserID() != 1){ ?> <div class="ccm-profile-member"> <!--<div class="ccm-profile-member-avatar"><?php echo $av->outputUserAvatar($user)?></div>--> <div class="ccm-profile-member-detail"> <!-- Only user if you want profiles enabled. (Make sure to enable public profiles in C5) <div class="ccm-profile-member-username"><a href="<?php echo $this->url('/profile','view', $user->getUserID())?>"><span class='attribute'>Username:</span> <?php echo $user->getUserName()?></a></div> --> <div class="ccm-profile-member-fields"> <?php $attribs = UserAttributeKey::getPublicProfileList(); foreach($attribs as $ak) { ?> <div class="member_row">
Viewing 15 lines of 31 lines. View entire code block.
I was thinking there was a way to do it through the dashboard. No?
The email isn't a user attribute. It is part of the user info object, so you will need to grab it before your attribute loop.
Here is the entire code block:
Here is the entire code block:
<?php foreach($users as $user) { if($user->getUserID() != 1){ ?> <div class="ccm-profile-member"> <!--<div class="ccm-profile-member-avatar"><?php echo $av->outputUserAvatar($user)?></div>--> <div class="ccm-profile-member-detail"> <!-- Only user if you want profiles enabled. (Make sure to enable public profiles in C5) <div class="ccm-profile-member-username"><a href="<?php echo $this->url('/profile','view', $user->getUserID())?>"><span class='attribute'>Username:</span> <?php echo $user->getUserName()?></a></div> --> <div class="ccm-profile-member-fields"> <?php /* **** Start User email *** */ $ui = UserInfo::getByID($user->getUserID());
Viewing 15 lines of 40 lines. View entire code block.
Ah gotcha. :) Worked like a charm! Thank you much!
http://www.concrete5.org/documentation/developers/permissions/users...