mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 14:08:42 +00:00
feat(forgot_pw): add client info in email
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e43444e02d
commit
d410dff7d8
@ -52,6 +52,9 @@ $forgot_form->handle = function (&$vdata) {
|
|||||||
$url = HTML::url("/reset-password", ['params' => ['p' => $sufs]]);
|
$url = HTML::url("/reset-password", ['params' => ['p' => $sufs]]);
|
||||||
$oj_url = HTML::url('/');
|
$oj_url = HTML::url('/');
|
||||||
$name = $user['username'];
|
$name = $user['username'];
|
||||||
|
$remote_addr = UOJContext::remoteAddr();
|
||||||
|
$http_x_forwarded_for = UOJContext::httpXForwardedFor();
|
||||||
|
$user_agent = UOJContext::httpUserAgent();
|
||||||
|
|
||||||
if ($user['realname']) {
|
if ($user['realname']) {
|
||||||
$name .= ' (' . $user['realname'] . ')';
|
$name .= ' (' . $user['realname'] . ')';
|
||||||
@ -65,6 +68,11 @@ $forgot_form->handle = function (&$vdata) {
|
|||||||
<p>您最近告知我们需要重置您在 {$oj_name_short} 上账号的密码。请访问以下链接:<a href="{$url}">{$url}</a> (如果无法点击链接,请试着复制链接并粘贴至浏览器中打开。)</p>
|
<p>您最近告知我们需要重置您在 {$oj_name_short} 上账号的密码。请访问以下链接:<a href="{$url}">{$url}</a> (如果无法点击链接,请试着复制链接并粘贴至浏览器中打开。)</p>
|
||||||
<p>如果您没有请求重置密码,则忽略此信息。该链接将在 72 小时后自动过期失效。</p>
|
<p>如果您没有请求重置密码,则忽略此信息。该链接将在 72 小时后自动过期失效。</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><small>请求 IP: {$remote_addr} (转发来源: {$http_x_forwarded_for})</small></li>
|
||||||
|
<li><small>用户代理: {$user_agent}</small></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<p>{$oj_name}</p>
|
<p>{$oj_name}</p>
|
||||||
<p><a href="{$oj_url}">{$oj_url}</a></p>
|
<p><a href="{$oj_url}">{$oj_url}</a></p>
|
||||||
EOD;
|
EOD;
|
||||||
|
Loading…
Reference in New Issue
Block a user