mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: user: fix lostpass link generation
This commit is contained in:
1 parent
4930220fca
commit
08e41a8ae8
1 file changed
+5
-4
@@ -289,11 +289,12 @@ class UserLostPassHandler extends Handler {
|
|||||||
system.get('session.unsaved_expire_seconds'),
|
system.get('session.unsaved_expire_seconds'),
|
||||||
{ uid: udoc._id },
|
{ uid: udoc._id },
|
||||||
);
|
);
|
||||||
const m = await this.renderHTML('user_lostpass_mail.html', {
|
const prefix = this.domain.host
|
||||||
url: `lostpass/${tid}`,
|
|
||||||
url_prefix: this.domain.host
|
|
||||||
? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}`
|
? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}`
|
||||||
: system.get('server.url'),
|
: system.get('server.url');
|
||||||
|
const m = await this.renderHTML('user_lostpass_mail.html', {
|
||||||
|
url: `/lostpass/${tid}`,
|
||||||
|
url_prefix: prefix.endsWith('/') ? prefix.slice(0, -1) : prefix,
|
||||||
uname: udoc.uname,
|
uname: udoc.uname,
|
||||||
});
|
});
|
||||||
await sendMail(mail, 'Lost Password', 'user_lostpass_mail', m);
|
await sendMail(mail, 'Lost Password', 'user_lostpass_mail', m);
|
||||||
|
|||||||
Reference in new issue
Block a user