autofill registration form email address if user has a ssl client certificate
This commit is contained in:
parent
4e63a9a679
commit
b212c837f0
2 changed files with 8 additions and 2 deletions
|
@ -24,7 +24,7 @@ window.onload = function() {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th>
|
<th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th>
|
||||||
<td><input type="text" id="email" name="email" size="40" class="required" /></td>
|
<td><input type="text" id="email" name="email" size="40" class="required" value="<?php echo htmlspecialchars(POST_MAIL); ?>" /></td>
|
||||||
<td><?php echo '←'.T_(' to send you your password if you forget it')?></td>
|
<td><?php echo '←'.T_(' to send you your password if you forget it')?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,13 @@ if (!$GLOBALS['enableRegistration']) {
|
||||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||||
isset($_POST['username']) ? define('POST_USERNAME', $_POST['username']): define('POST_USERNAME', '');
|
isset($_POST['username']) ? define('POST_USERNAME', $_POST['username']): define('POST_USERNAME', '');
|
||||||
isset($_POST['password']) ? define('POST_PASS', $_POST['password']): define('POST_PASS', '');
|
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', '');
|
isset($_POST['antispamAnswer']) ? define('POST_ANTISPAMANSWER', $_POST['antispamAnswer']): define('POST_ANTISPAMANSWER', '');
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue