airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata-php-gateway git commit: making array if not array
Date Wed, 16 Mar 2016 20:35:12 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop c4b8667b9 -> abec3c30d


making array if not array


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/abec3c30
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/abec3c30
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/abec3c30

Branch: refs/heads/develop
Commit: abec3c30dd5ba1e7653c404bebf436411dd62d5a
Parents: c4b8667
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Mar 16 16:35:06 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Mar 16 16:35:06 2016 -0400

----------------------------------------------------------------------
 app/libraries/Wsis/Stubs/UserStoreManager.php | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/abec3c30/app/libraries/Wsis/Stubs/UserStoreManager.php
----------------------------------------------------------------------
diff --git a/app/libraries/Wsis/Stubs/UserStoreManager.php b/app/libraries/Wsis/Stubs/UserStoreManager.php
index 9e59684..f0952c8 100755
--- a/app/libraries/Wsis/Stubs/UserStoreManager.php
+++ b/app/libraries/Wsis/Stubs/UserStoreManager.php
@@ -197,6 +197,8 @@ class UserStoreManager {
      */
     public function updateRoleListOfUser( $username, $roles){
         if(isset($roles["deleted"])) {
+            if(!is_array($roles["deleted"]))
+                $roles["deleted"] = array($roles["deleted"]);
             foreach ($roles["deleted"] as $role) {
                 $parameters = new UpdateRoleListOfUser();
                 $parameters->userName = $username;
@@ -205,6 +207,8 @@ class UserStoreManager {
             }
         }
         if(isset($roles["new"])){
+            if(!is_array($roles["new"]))
+                $roles["new"] = array($roles["new"]);
             foreach ($roles["new"] as $role) {
                 $parameters = new UpdateRoleListOfUser();
                 $parameters->userName = $username;


Mime
View raw message