airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/3] airavata-php-gateway git commit: New user dashboard error fix
Date Sun, 20 Mar 2016 23:43:51 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop eab49434b -> e674a1e88


New user dashboard error fix


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/bbcbff27
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/bbcbff27
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/bbcbff27

Branch: refs/heads/develop
Commit: bbcbff27a630d4d1640bac3d3493ec21d8cd4880
Parents: eab4943
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Sun Mar 20 19:42:06 2016 -0400
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Sun Mar 20 19:42:06 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bbcbff27/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index f302663..0ae5d00 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -151,11 +151,12 @@ class AccountController extends BaseController
             CommonUtilities::store_id_in_session($username);
             Session::put("gateway_id", Config::get('pga_config.airavata')['gateway-id']);
 
-            if(Session::get("admin") || Session::get("admin-read-only") || Session::get("authorized-user")){
+            if(Session::has("admin") || Session::has("admin-read-only") || Session::has("authorized-user")){
           
                 return $this->initializeWithAiravata($username);
             }
 
-            if(Session::get("admin") || Session::get("admin-read-only")){
+            if(Session::has("admin") || Session::has("admin-read-only")){
+
                 return Redirect::to("admin/dashboard");
             }else{
                 return Redirect::to("account/dashboard");
@@ -237,7 +238,11 @@ class AccountController extends BaseController
             return View::make('home');
         }
 
-        return Redirect::to("admin/dashboard");
+        if(Session::has("admin") || Session::has("admin-read-only")){
+            return Redirect::to("admin/dashboard");
+        }else{
+            return Redirect::to("account/dashboard");
+        }
     }
 
     public function forgotPassword()


Mime
View raw message