Closed Lormen closed 5 years ago
Hi. You can use $ipa->user()->find()
without arguments.
Here is a snippet showing how to export users information to CSV.
$fp = fopen('users.csv', 'wb');
$users = $ipa->user()->find();
foreach ($users as $user) {
$fields = [
$user->cn[0],
$user->gecos[0],
$user->homedirectory[0],
$user->krbprincipalname[0],
$user->loginshell[0],
implode(', ', $user->memberof_group),
$user->dn,
];
fputcsv($fp, $fields);
}
fclose($fp);
Hi. I'm going to close this issue as I think I've answered it by email. Feel free to open a new issue if you need help.
Hi, would it be possible to pull all users as I was planning on filling a table for user editing?
Cheers,
Pete