This is an automated email from the ASF dual-hosted git repository. machristie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git
commit 220358606b41d35b9685faa5820ab2b6aa22d4cc Author: stephenpaul2727 <[email protected]> AuthorDate: Sun Oct 8 14:45:42 2017 -0400 [JIRA-ISSUE: 2444] Added User list with username, email, firstname, lastname fields Issue Resolved --- app/libraries/IamAdminServicesUtilities.php | 2 +- app/libraries/Keycloak/Keycloak.php | 3 ++- app/views/admin/manage-users.blade.php | 13 ++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/libraries/IamAdminServicesUtilities.php b/app/libraries/IamAdminServicesUtilities.php index fbb208e..3ba50df 100644 --- a/app/libraries/IamAdminServicesUtilities.php +++ b/app/libraries/IamAdminServicesUtilities.php @@ -33,7 +33,7 @@ class IamAdminServicesUtilities { $user_profiles = IamAdminServices::getUsersWithRole($authz_token, $role_name); $users = []; foreach ($user_profiles as $user_profile) { - $users[] = $user_profile->userId; + array_push($users, (object)["firstName"=>$user_profile->firstName,"lastName"=>$user_profile->lastName,"email"=>implode(",",$user_profile->emails),"userName"=>$user_profile->userId]); } return $users; } diff --git a/app/libraries/Keycloak/Keycloak.php b/app/libraries/Keycloak/Keycloak.php index 25a059e..18dce8f 100644 --- a/app/libraries/Keycloak/Keycloak.php +++ b/app/libraries/Keycloak/Keycloak.php @@ -251,7 +251,7 @@ class Keycloak { $users = $this->users->getUsers($this->realm); $usernames = []; foreach ($users as $user) { - $usernames[] = $user->username; + array_push($usernames, (object)["firstName"=>$user->firstName,"lastName"=>$user->lastName,"email"=>$user->email,"userName"=>$user->username]); } return $usernames; } @@ -447,3 +447,4 @@ class Keycloak { return $json; } } + diff --git a/app/views/admin/manage-users.blade.php b/app/views/admin/manage-users.blade.php index c8ea524..1b038cb 100644 --- a/app/views/admin/manage-users.blade.php +++ b/app/views/admin/manage-users.blade.php @@ -54,7 +54,11 @@ <table class="table table-striped table-condensed"> <tr> + <th>First Name</th> + <th>Last Name</th> <th>Username</th> + <th>Email</th> + <th> Role : <select onchange="location = this.options[this.selectedIndex].value;"> @@ -77,10 +81,13 @@ </tr> @foreach( (array)$users as $user) <tr class="user-row"> - <td>{{ $user }}</td> + <td>{{ $user->firstName }}</td> + <td>{{ $user->lastName }}</td> + <td>{{ $user->userName }}</td> + <td>{{ $user->email }}</td> <td> <button class="button btn btn-default check-roles" type="button" - data-username="{{$user}}">Check All Roles + data-username="{{$user->userName}}">Check All Roles </button> <div class="user-roles"></div> </td> @@ -280,4 +287,4 @@ }); } </script> -@stop \ No newline at end of file +@stop -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
