git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce6d14a
)
widget/contact: current user overrides login, email fallback
author
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 4 Nov 2019 23:20:54 +0000
(
00:20
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 4 Nov 2019 23:20:54 +0000
(
00:20
+0100)
widget/contact.php
patch
|
blob
|
history
diff --git
a/widget/contact.php
b/widget/contact.php
index b50537517d7b68952f50922a53c244b7763e8e91..ed0a0828140c7f875a7271d98075b31155b678a3 100644
(file)
--- a/
widget/contact.php
+++ b/
widget/contact.php
@@
-4,6
+4,10
@@
if ($_POST) {
global $User;
if ($User) {
$_REQUEST['login'] = $User->login;
+ $_REQUEST['email'] = $_REQUEST['email'] ?: $User->email;
+ }
+ else {
+ unset($_REQUEST['login']);
}
$error = mailform($_REQUEST);
if (!empty($error)) {