Skip to content

Commit

Permalink
get account data as array
Browse files Browse the repository at this point in the history
- and use the constant

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed May 7, 2021
1 parent 55a3eb2 commit 8560676
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Slave.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ public function batchUpdate(): void {
* @return array
*/
protected function getAccountData(IUser $user): array {
$rawData = $this->accountManager->getAccount($user);
$rawData = $this->accountManager->getAccount($user)->getProperties();
$data = [];
foreach ($rawData as $key => $value) {
if ($key === 'displayname') {
if ($key === IAccountManager::PROPERTY_DISPLAYNAME) {
$data['name'] = $value['value'];
} elseif (isset($value['value'])) {
$data[$key] = $value['value'];
Expand Down

0 comments on commit 8560676

Please sign in to comment.