You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/03/16 21:35:12 UTC

airavata-php-gateway git commit: making array if not array

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 <su...@gmail.com>
Authored: Wed Mar 16 16:35:06 2016 -0400
Committer: scnakandala <su...@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;