Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
9a82fbea05
|
@ -258,18 +258,20 @@ module.exports = function(Self) {
|
||||||
|
|
||||||
class Mailer {
|
class Mailer {
|
||||||
async send(verifyOptions, cb) {
|
async send(verifyOptions, cb) {
|
||||||
const url = new URL(verifyOptions.verifyHref);
|
try {
|
||||||
if (process.env.NODE_ENV) url.port = '';
|
const url = new URL(verifyOptions.verifyHref);
|
||||||
|
if (process.env.NODE_ENV) url.port = '';
|
||||||
|
|
||||||
const params = {
|
const email = new Email('email-verify', {
|
||||||
url: url.href,
|
url: url.href,
|
||||||
recipient: verifyOptions.to
|
recipient: verifyOptions.to
|
||||||
};
|
});
|
||||||
|
await email.send();
|
||||||
|
|
||||||
const email = new Email('email-verify', params);
|
cb(null, verifyOptions.to);
|
||||||
email.send();
|
} catch (err) {
|
||||||
|
cb(err);
|
||||||
cb(null, verifyOptions.to);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ const execFile = require('child_process').execFile;
|
||||||
* https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties
|
* https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties
|
||||||
*/
|
*/
|
||||||
const UserAccountControlFlags = {
|
const UserAccountControlFlags = {
|
||||||
ACCOUNTDISABLE: 2
|
ACCOUNTDISABLE: 0x2,
|
||||||
|
DONT_EXPIRE_PASSWD: 0x10000
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
|
@ -118,7 +119,8 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = {
|
entry = {
|
||||||
userAccountControl: sambaUser.userAccountControl
|
userAccountControl: (sambaUser.userAccountControl
|
||||||
|
| UserAccountControlFlags.DONT_EXPIRE_PASSWD)
|
||||||
& ~UserAccountControlFlags.ACCOUNTDISABLE,
|
& ~UserAccountControlFlags.ACCOUNTDISABLE,
|
||||||
uidNumber: info.uidNumber,
|
uidNumber: info.uidNumber,
|
||||||
accountExpires: 0,
|
accountExpires: 0,
|
||||||
|
|
Loading…
Reference in New Issue