summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/account.php11
-rw-r--r--pages/account/3.php9
2 files changed, 20 insertions, 0 deletions
diff --git a/includes/account.php b/includes/account.php
index 05b07a7..0899ba6 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -18,6 +18,7 @@
require_once("../includes/loggedin.php");
require_once("../includes/lib/l10n.php");
require_once('lib/check_weak_key.php');
+ require_once('notary.inc.php');
loadem("account");
@@ -193,6 +194,14 @@
if($process != "" && $oldid == 3)
{
+ if(!array_key_exists('CCA',$_REQUEST))
+ {
+ showheader(_("My CAcert.org Account!"));
+ echo _("You did not accept the CAcert Community Agreement (CCA), hit the back button and try again.");
+ showfooter();
+ exit;
+ }
+
if(!(array_key_exists('addid',$_REQUEST) && is_array($_REQUEST['addid'])) && $_REQUEST['SSO'] != '1')
{
showheader(_("My CAcert.org Account!"));
@@ -317,6 +326,8 @@
exit;
}
+ write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1);
+
$query = "insert into emailcerts set
`CN`='$defaultemail',
`keytype`='NS',
diff --git a/pages/account/3.php b/pages/account/3.php
index 87484f9..2402ae4 100644
--- a/pages/account/3.php
+++ b/pages/account/3.php
@@ -114,6 +114,15 @@ if($_SESSION['profile']['points'] >= 50)
<tr name="expert">
<td class="DataTD" colspan="2"><textarea name="optionalCSR" cols="80" rows="5"></textarea></td>
</tr>
+ <tr>
+ <td class="DataTD">
+ <input type="checkbox" name="CCA"" />
+ </td>
+ <td class="DataTD" align="left">
+ <strong><?=sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
+ <?=_("Please Note: You need to accept the CCA to proceed.")?>
+ </td>
+ </tr>
<tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
</tr>