-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It has been many years since we've used this script. It had not been updated to work with the last rewrite of the system. Updates #52
- Loading branch information
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<?php | ||
/** | ||
* @copyright 2014 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
* @author Cliff Ingham <[email protected]> | ||
* @copyright 2024 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE | ||
*/ | ||
declare (strict_types=1); | ||
include '../bootstrap.php'; | ||
|
||
use Application\Models\DepartmentGateway; | ||
|
||
$gateway = new DepartmentGateway(); | ||
$dn = 'OU=Utilities,OU=Departments,DC=cob,DC=bloomington,DC=in,DC=gov'; | ||
$staff = DepartmentGateway::search($dn, []); | ||
foreach ($staff as $p) { | ||
$user = $p->username; | ||
$data = $p->getPhoto(); | ||
echo "$user\n"; | ||
|
||
$people = $gateway->getPeople(); | ||
foreach ($people as $p) { | ||
$username = $p->username; | ||
echo "$username\n"; | ||
$data = $gateway->getPhoto($username); | ||
if ($data) { | ||
file_put_contents("./users/$username.jpg", $data); | ||
file_put_contents("./users/$user.jpg", $data); | ||
} | ||
} |