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: hack to work with IS 5.0.0 in capatcha verification
Date Thu, 18 Feb 2016 02:19:15 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master e460b2275 -> d6fecb33d


hack to work with IS 5.0.0 in capatcha verification


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

Branch: refs/heads/master
Commit: d6fecb33dc30422b75b69f9ac0fe999e52fa8961
Parents: e460b22
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Feb 17 21:19:11 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Feb 17 21:19:11 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d6fecb33/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index f05e360..f19702f 100755
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -158,7 +158,7 @@ class AccountController extends BaseController
             if(Session::get("admin") || Session::get("admin-read-only")){
                 return Redirect::to("admin/dashboard");
             }else{
-                return Redirect::to("account/dashboard");
+                return Redirect::to("home");
             }
         }
 
@@ -230,7 +230,7 @@ class AccountController extends BaseController
             return View::make('home');
         }
 
-        return Redirect::to("account/dashboard");
+        return Redirect::to("admin/dashboard");
     }
 
     public function forgotPassword()
@@ -324,9 +324,15 @@ class AccountController extends BaseController
                     }
                 }else{
                     $capatcha = WSIS::getCapatcha()->return;
-                    return View::make("account/verify-human", array("username"=>$username,"code"=>$confirmation,
-                        "imagePath"=>$capatcha->imagePath, "secretKey"=>$capatcha->secretKey,
-                        "imageUrl"=> Config::get("pga_config.wsis")["service-url"] . $capatcha->imagePath));
+                    //hack to work with wso2 IS 5.0.0
+                    if (file_exists($capatcha->imagePath)){
+                        return View::make("account/verify-human", array("username"=>$username,"code"=>$confirmation,
+                            "imagePath"=>$capatcha->imagePath, "secretKey"=>$capatcha->secretKey,
+                            "imageUrl"=> Config::get("pga_config.wsis")["service-url"]
. $capatcha->imagePath));
+                    }else{
+                        WSIS::confirmUserRegistration("123", $capatcha->imagePath,
+                            $capatcha->secretKey, $username, $confirmation, Config::get('pga_config.wsis')['tenant-domain']);
+                    }
                 }
             }catch (Exception $e){
                 var_dump($e);exit;
@@ -425,7 +431,4 @@ class AccountController extends BaseController
         return Redirect::to('home');
     }
 
-    public function dashboard(){
-        return View::make("account/dashboard");
-    }
 }


Mime
View raw message