airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-php-gateway] 01/03: AIRAVATA-2571 Add userEnabled to getUsersWithRole
Date Wed, 13 Dec 2017 20:27:23 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git

commit 9e22a81645183fe93585c11a00b7505a6e21e77a
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Wed Dec 13 15:16:41 2017 -0500

    AIRAVATA-2571 Add userEnabled to getUsersWithRole
---
 app/libraries/IamAdminServicesUtilities.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/libraries/IamAdminServicesUtilities.php b/app/libraries/IamAdminServicesUtilities.php
index 3ba50df..b5623c5 100644
--- a/app/libraries/IamAdminServicesUtilities.php
+++ b/app/libraries/IamAdminServicesUtilities.php
@@ -1,4 +1,5 @@
 <?php
+use Airavata\Model\User\Status;
 
 class IamAdminServicesUtilities {
 
@@ -33,7 +34,7 @@ class IamAdminServicesUtilities {
         $user_profiles = IamAdminServices::getUsersWithRole($authz_token, $role_name);
         $users = [];
         foreach ($user_profiles as $user_profile) {
-            array_push($users, (object)["firstName"=>$user_profile->firstName,"lastName"=>$user_profile->lastName,"email"=>implode(",",$user_profile->emails),"userName"=>$user_profile->userId]);
+            array_push($users, (object)["firstName"=>$user_profile->firstName,"lastName"=>$user_profile->lastName,"email"=>implode(",",$user_profile->emails),"userName"=>$user_profile->userId,
"userEnabled"=>$user_profile->State == Status::CONFIRMED]);
         }
         return $users;
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <commits@airavata.apache.org>.

Mime
View raw message