ldapSaveUserToFile will now append the file (#4276)

Ylian Saint-Hilaire committed Jul 18, 2022 at 16:18 UTC 954e5cde327e101976cc81fa695649511d470a5c
1 file changed +2 -2
webserver.js
+2 -2
@@ -449,7 +449,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
449 } else {
450 // Save this LDAP user to file if needed
451 if (typeof domain.ldapsaveusertofile == 'string') {
452 - obj.fs.writeFile(domain.ldapsaveusertofile, JSON.stringify(xxuser, null, 2) + '\r\n\r\n', function (err) { });
452 + obj.fs.appendFile(domain.ldapsaveusertofile, JSON.stringify(xxuser, null, 2) + '\r\n\r\n', function (err) { });
453 }
454
455 // Work on getting the userid for this LDAP user
@@ -571,7 +571,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
571
572 // Save this LDAP user to file if needed
573 if (typeof domain.ldapsaveusertofile == 'string') {
574 - obj.fs.writeFile(domain.ldapsaveusertofile, JSON.stringify(xxuser, null, 2) + '\r\n\r\n', function (err) { });
574 + obj.fs.appendFile(domain.ldapsaveusertofile, JSON.stringify(xxuser, null, 2) + '\r\n\r\n', function (err) { });
575 }
576
577 // Work on getting the userid for this LDAP user