summaryrefslogtreecommitdiff
path: root/www/register.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-04 17:13:14 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-04 17:13:14 +0200
commitb212c837f0fab0c95c0699afc63e7085e094f88f (patch)
tree3c6d267a9e72e9081e7863825d27fea6ede62afe /www/register.php
parent4e63a9a6793583c7f7f4959724be2653ddc85f49 (diff)
downloadsemanticscuttle-b212c837f0fab0c95c0699afc63e7085e094f88f.tar.gz
semanticscuttle-b212c837f0fab0c95c0699afc63e7085e094f88f.tar.bz2
autofill registration form email address if user has a ssl client certificate
Diffstat (limited to 'www/register.php')
-rw-r--r--www/register.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/www/register.php b/www/register.php
index c01939a..dce65ba 100644
--- a/www/register.php
+++ b/www/register.php
@@ -34,7 +34,13 @@ if (!$GLOBALS['enableRegistration']) {
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
isset($_POST['username']) ? define('POST_USERNAME', $_POST['username']): define('POST_USERNAME', '');
isset($_POST['password']) ? define('POST_PASS', $_POST['password']): define('POST_PASS', '');
-isset($_POST['email']) ? define('POST_MAIL', $_POST['email']): define('POST_MAIL', '');
+if (isset($_POST['email'])) {
+ define('POST_MAIL', $_POST['email']);
+} else if (isset($_SERVER['SSL_CLIENT_S_DN_Email'])) {
+ define('POST_MAIL', $_SERVER['SSL_CLIENT_S_DN_Email']);
+} else {
+ define('POST_MAIL', '');
+}
isset($_POST['antispamAnswer']) ? define('POST_ANTISPAMANSWER', $_POST['antispamAnswer']): define('POST_ANTISPAMANSWER', '');