Skip to content
Snippets Groups Projects
Commit 31abe582 authored by Olav Morken's avatar Olav Morken
Browse files

Error reporting: Fill in email address from attributes, if present.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@767 44740490-163a-0410-bde0-09ae8108e29a
parent 28e93818
No related branches found
No related tags found
No related merge requests found
......@@ -421,6 +421,15 @@ class SimpleSAML_Utilities {
$t->data['errorreportaddress'] = NULL;
}
$session = SimpleSAML_Session::getInstance();
$attributes = $session->getAttributes();
if(is_array($attributes) && array_key_exists('mail', $attributes) && count($attributes['mail']) > 0) {
$email = $attributes['mail'][0];
} else {
$email = '';
}
$t->data['email'] = $email;
$t->data['exceptionmsg'] = $emsg;
$t->data['exceptiontrace'] = $etrace;
......
......@@ -57,7 +57,7 @@ if (!empty($this->data['errorreportaddress'])) {
<form action="<?php echo htmlspecialchars($this->data['errorreportaddress']); ?>" method="post">
<p><?php echo $this->t('report_text'); ?></p>
<p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="" />
<p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?php echo($this->data['email']); ?>" />
<p>
<textarea style="width: 300px; height: 100px" name="text"><?php echo $this->t('report_explain'); ?></textarea>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment