summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2013-09-21 08:20:49 +0200
committerINOPIAE <inopiae@cacert.org>2013-09-21 08:20:49 +0200
commitb7fa75ca45fd852a6da408ca28b945769664f546 (patch)
tree3e6381484d1859090d587f77459f9125186e9962
parent89dd7d96518ba62305be2156e6aedfe665d337fb (diff)
downloadcacert-devel-b7fa75ca45fd852a6da408ca28b945769664f546.tar.gz
cacert-devel-b7fa75ca45fd852a6da408ca28b945769664f546.tar.xz
cacert-devel-b7fa75ca45fd852a6da408ca28b945769664f546.zip
bug 1192: changed the client login procedure, took out echo
-rw-r--r--www/index.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/www/index.php b/www/index.php
index 4d403a8..a706ce1 100644
--- a/www/index.php
+++ b/www/index.php
@@ -165,17 +165,15 @@ require_once('../includes/notary.inc.php');
if($_SESSION['profile']['id'] != 0)
{
- $cca=get_last_user_agreement($user_id);
- echo '###0###'.$cca['active'];
- if (!isset($cca['active'])){
+ $ccatest=get_user_agreement_status($_SESSION['profile']['id'],'CCA');
+ if (0==$ccatest) {
$id=52;
- $ccatest=TRUE;
+ header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=52");
}else{
$_SESSION['profile']['loggedin'] = 1;
- header('location: https://'.$_SERVER['HTTP_HOST'].'/account.php');
- echo '###1###'.$cca['active'];
- exit;
+ header("location: https://".$_SERVER['HTTP_HOST']."/account.php");
}
+ exit;
} else {
$_SESSION['profile']['loggedin'] = 0;
}
@@ -186,7 +184,6 @@ require_once('../includes/notary.inc.php');
if($id == 4 && array_key_exists('profile',$_SESSION) && array_key_exists('loggedin',array($_SESSION['profile'])) && $_SESSION['profile']['loggedin'] == 1)
{
header("location: https://".$_SERVER['HTTP_HOST']."/account.php");
- echo '###2###'.$cca['active'];
exit;
}