User List
Permalink 1 user found helpful
Ok, I think im going crazy,
All I need to do is make a list of users on the site, and display a bit of info.
In theory it should just be a simple loop through all of the user accounts, and print the info, but I've read all the documentation, and tried numerous scraps of code, to no avail...
im using this code:
to display info about the current user, surely i should just be able to adapt it to loop though for every user?
Any help would be greatly appreciated! :)
All I need to do is make a list of users on the site, and display a bit of info.
In theory it should just be a simple loop through all of the user accounts, and print the info, but I've read all the documentation, and tried numerous scraps of code, to no avail...
im using this code:
$u = new User(); //echo $u->getUserName(); $username = $u->getUserName(); $ui = UserInfo::getByUserName($username); $ui->getAttribute('ak_fname'); ?> <div class="UserInfoClass"> <label>Username</label> <div class="UserInfoClassInfo" > <?php echo $u->getUserName(); ?></div> </div> <?php $uaks = UserAttributeKey::getPublicProfileList(); foreach($uaks as $ua) { ?> <div class="UserInfoClass">
Viewing 15 lines of 18 lines. View entire code block.
to display info about the current user, surely i should just be able to adapt it to loop though for every user?
Any help would be greatly appreciated! :)
Thanks, Thats a great help!
I've never parsed anything before, but ill have a go!
I've never parsed anything before, but ill have a go!
Calum - its not very different than the code you already had. Try this and you'll be able to adapt it.
Thankyou I managed it using a slightly different method that was better suited to what I needed,
I would post the code, but its laced with javascript now, and is basically unreadable unless you know its exact purpose.
Thankyou!!!
I would post the code, but its laced with javascript now, and is basically unreadable unless you know its exact purpose.
Thankyou!!!
Very basic PHP knowledge here, how is it possible to parse the array output into usable information... also, I need to filter the output by user group; thank you!
Ollie,
If I was doing something like this in Job, what namespace would I need to use?
If I was doing something like this in Job, what namespace would I need to use?
http://www.concrete5.org/documentation/developers/permissions/user-...
There are various filter methods you might want to use to refine which users you return.
The code below returns an array of UserInfo Objects, you should be able to parse that array to display what you need.