UserList::get

Permalink 1 user found helpful
The Developer's Index would imply that that the UserList::get() function returns User objects, but it seems to return UserInfo objects instead (I'm running Concrete5.6.1.2). It has caused me a lot of frustration in the past, so I thought I'd post about it. I would suspect that UserList::getPage() returns UserInfo objects also.

 
bbeng89 replied on at Permalink Reply
bbeng89
Thanks for the heads up! It does kind of make sense that it would return UserInfo objects though. From the docs:

"The User object is used specifically for User authentication. If you're storing any custom information against user accounts in your website/application, including any user attributes, you'll want to access the UserInfo object"

It would definitely be nice if they specified in the UserList docs that it returned UserInfo objects though.

Thanks again
tonidomenech replied on at Permalink Reply
tonidomenech
How I can get the name of the registered users and load in a select box?


<?php
Loader::model('user_list');
$userList = new UserList();
$datos = new ArrayObject();
$datosss = new ArrayObject();

$users = $userList->get();

foreach ($users as $userInfo) {

$datosss = $userInfo->uName;
for($i=0; $i <= count($datosss)+1; $i++){

$datos[$i] = $userInfo->uName;

}
// How to access the attributes of each user/


}
?>


in side the Form:

echo $form->select('usuario', $datos , $usuario);

I did wrong?