Listing attributes and email addresses on the members list
Permalink
Hi all
I'm trying to extend the members list a bit to provide more information.
I've got it showing up some custom attributes, but I can't get the email to show. I'm not fully understanding the API despite the documentation on it.
Here's what I have in my custom members.php:
I need to get the UserInfo object but after a bit of experimentation calling it I couldn't work it out.
Any help would be much appreciated :)
I'm trying to extend the members list a bit to provide more information.
I've got it showing up some custom attributes, but I can't get the email to show. I'm not fully understanding the API despite the documentation on it.
Here's what I have in my custom members.php:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <div id="ccm-profile-wrapper"> <form method="get" action="<?php echo DIR_REL?>/<?php echo DISPATCHER_FILENAME?>"> Search <input type="hidden" name="cID" value="<?php echo $c->getCollectionID()?>" /> <input name="keywords" type="text" value="<?php echo $keywords?>" size="20" /> <input name="submit" type="submit" value="<?php echo t('Search')?>" /> </form> <br /><br /> <h1>Staff list</h1> <?php if ($userList->getTotal() == 0) { ?> <div><?php echo t('No users found.')?></div> <?php } else { ?> <div class="ccm-profile-member-list"> <?php
Viewing 15 lines of 41 lines. View entire code block.
I need to get the UserInfo object but after a bit of experimentation calling it I couldn't work it out.
Any help would be much appreciated :)
Thanks for the reply.
EDIT: nevermind, I worked it out :)
EDIT: nevermind, I worked it out :)
Yeah, it's done via a magic method...
...where $ui is a UserInfo object. I, too, am displaying email addresses on a client's site along with some custom attributes.
<shamelessplug>
And if you're displaying emails on a public site, you might want to check out this handy dandy add-on:
http://www.concrete5.org/marketplace/addons/encrypted-e-mail-addres...
</shamelessplug>
:-)
-Steve
$ui->getUserEmail();
...where $ui is a UserInfo object. I, too, am displaying email addresses on a client's site along with some custom attributes.
<shamelessplug>
And if you're displaying emails on a public site, you might want to check out this handy dandy add-on:
http://www.concrete5.org/marketplace/addons/encrypted-e-mail-addres...
</shamelessplug>
:-)
-Steve
$ui = Loader::model('userinfo');
also maybe take a look at Loader::model('user_list');
(/concrete/models/user_list.php)