summaryrefslogtreecommitdiff
path: root/includes/loggedin.php
diff options
context:
space:
mode:
authormam <m.maengel@project-biz.de>2014-02-22 10:33:22 +0100
committermam <m.maengel@project-biz.de>2014-02-22 10:33:22 +0100
commit139ea3024d88a9156168bf7a01dfae092a59f662 (patch)
treee5eeb8eed2b732697e68a9d969926716d11e0f71 /includes/loggedin.php
parent83e838610ab177eb3de84a9768a66735756aa0ae (diff)
downloadcacert-devel-139ea3024d88a9156168bf7a01dfae092a59f662.tar.gz
cacert-devel-139ea3024d88a9156168bf7a01dfae092a59f662.tar.xz
cacert-devel-139ea3024d88a9156168bf7a01dfae092a59f662.zip
bug 1192: moved the CCA check to the loggedin.php file
Diffstat (limited to 'includes/loggedin.php')
-rw-r--r--includes/loggedin.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/loggedin.php b/includes/loggedin.php
index 4f9b8e8..8119b9b 100644
--- a/includes/loggedin.php
+++ b/includes/loggedin.php
@@ -19,6 +19,7 @@
include_once("../includes/lib/general.php");
require_once("../includes/lib/l10n.php");
include_once("../includes/mysql.php");
+ require_once('../includes/notary.inc.php');
if(!isset($_SESSION['profile']) || !is_array($_SESSION['profile'])) {
$_SESSION['profile'] = array( 'id' => 0, 'loggedin' => 0 );
@@ -49,7 +50,7 @@
else
unset($_SESSION['profile']);
}
-
+
if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] && ($_SESSION['profile']['id'] == 0 || $_SESSION['profile']['loggedin'] == 0))
{
$user_id = get_user_id_from_cert($_SERVER['SSL_CLIENT_M_SERIAL'],
@@ -164,4 +165,12 @@
header("location: https://".$hostname."/index.php?id=4");
exit;
}
+
+ if (!isset($_SESSION['profile']['ccaagreement']) || !$_SESSION['profile']['ccaagreement'] == True) {
+ $_SESSION['profile']['ccaagreement']=get_user_agreement_status($_SESSION['profile']['id'],'CCA');
+ if ($_SESSION['profile']['ccaagreement'] == FALSE) {
+ header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=52");
+ exit;
+ }
+ }
?>