fixing user search issue
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/dddb721f Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/dddb721f Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/dddb721f Branch: refs/heads/master Commit: dddb721f95002cc1f6a66be24b3d6ab4c19c9ce4 Parents: 6c04ff3 Author: scnakandala <[email protected]> Authored: Wed Jan 27 10:22:13 2016 -0500 Committer: scnakandala <[email protected]> Committed: Wed Jan 27 10:22:13 2016 -0500 ---------------------------------------------------------------------- app/controllers/AccountController.php | 2 +- app/controllers/AdminController.php | 3 +++ app/controllers/StorageResourceController.php | 1 + app/libraries/Wsis/Stubs/UserStoreManager.php | 5 +++-- 4 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dddb721f/app/controllers/AccountController.php ---------------------------------------------------------------------- diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index dfe7b22..a213870 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -132,7 +132,7 @@ class AccountController extends BaseController Session::put('oauth-refresh-code',$refreshToken); Session::put('oauth-expiration-time',$expirationTime); Session::put("user-profile", $userProfile); - + Session::put('username', "Eroma2015"); if (in_array(Config::get('pga_config.wsis')['admin-role-name'], $userRoles)) { Session::put("admin", true); } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dddb721f/app/controllers/AdminController.php ---------------------------------------------------------------------- diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php index 23096f1..95b974d 100644 --- a/app/controllers/AdminController.php +++ b/app/controllers/AdminController.php @@ -46,6 +46,9 @@ class AdminController extends BaseController { else $users = WSIS::listUsers(); + if(!isset($users) || empty($users)){ + $users = array(); + } $roles = WSIS::getAllRoles(); Session::put("admin-nav", "manage-users"); return View::make("admin/manage-users", array("users" => $users, "roles" => $roles)); http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dddb721f/app/controllers/StorageResourceController.php ---------------------------------------------------------------------- diff --git a/app/controllers/StorageResourceController.php b/app/controllers/StorageResourceController.php index 0ec4c6e..ca1564d 100644 --- a/app/controllers/StorageResourceController.php +++ b/app/controllers/StorageResourceController.php @@ -160,6 +160,7 @@ class StorageresourceController extends BaseController { $this->beforeFilter('verifyeditadmin'); $result = SRUtilities::deleteActions(Input::all()); + var_dump($result);exit; /* if (Input::has("jsiId")) { return Redirect::to("cr/edit?crId=" . Input::get("crId") . "#tab-jobSubmission") http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dddb721f/app/libraries/Wsis/Stubs/UserStoreManager.php ---------------------------------------------------------------------- diff --git a/app/libraries/Wsis/Stubs/UserStoreManager.php b/app/libraries/Wsis/Stubs/UserStoreManager.php index 706f847..7afda25 100755 --- a/app/libraries/Wsis/Stubs/UserStoreManager.php +++ b/app/libraries/Wsis/Stubs/UserStoreManager.php @@ -127,8 +127,9 @@ class UserStoreManager { $parameters = new ListUsers(); $parameters->filter = "*" . $phrase . "*"; $parameters->maxItemLimit = -1; - - return $this->serviceStub->listUsers($parameters)->return; + if(isset($this->serviceStub->listUsers($parameters)->return)){ + return $this->serviceStub->listUsers($parameters)->return; + } } /**
