Skip to content

Commit 313b518

Browse files
authored
Merge pull request #33 from onelogin/copilot/fix-32
Fix missing app icons in getUserApps by upgrading to API v2 endpoint
2 parents 40a4116 + 0821813 commit 313b518

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/models/App.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct($data)
3232
{
3333
$this->id = isset($data->id)? (int) $data->id : null;
3434
$this->name = $data->name;
35-
$this->icon = $data->icon;
35+
$this->icon = isset($data->icon) ? $data->icon : null;
3636
$this->provisioned = $data->provisioned;
3737
$this->extension = $data->extension;
3838
$this->loginId = $data->login_id;

src/util/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Constants
1818
// User URLs
1919
const GET_USERS_URL = "https://api.%s.onelogin.com/api/1/users";
2020
const GET_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s";
21-
const GET_APPS_FOR_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/apps";
21+
const GET_APPS_FOR_USER_URL = "https://api.%s.onelogin.com/api/2/users/%s/apps";
2222
const GET_ROLES_FOR_USER_URL = "https://api.%s.onelogin.com/api/1/users/%s/roles";
2323
const GET_CUSTOM_ATTRIBUTES_URL = "https://api.%s.onelogin.com/api/1/users/custom_attributes";
2424
const CREATE_USER_URL = "https://api.%s.onelogin.com/api/1/users";

0 commit comments

Comments
 (0)