mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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'),
|
||||
{ uid: udoc._id },
|
||||
);
|
||||
const prefix = this.domain.host
|
||||
? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}`
|
||||
: system.get('server.url');
|
||||
const m = await this.renderHTML('user_lostpass_mail.html', {
|
||||
url: `lostpass/${tid}`,
|
||||
url_prefix: this.domain.host
|
||||
? `${this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host}`
|
||||
: system.get('server.url'),
|
||||
url: `/lostpass/${tid}`,
|
||||
url_prefix: prefix.endsWith('/') ? prefix.slice(0, -1) : prefix,
|
||||
uname: udoc.uname,
|
||||
});
|
||||
await sendMail(mail, 'Lost Password', 'user_lostpass_mail', m);
|
||||
|
||||
Reference in new issue
Block a user