Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ Go ahead and add the following code into your source file:
if (!req.changes.length)
return next(new ldap.ProtocolError('changes required'));

var user = req.users[req.dn.rdns[0].cn].attributes;
var user = req.users[req.dn.rdns[0].attrs.cn.value].attributes;
var mod;

for (var i = 0; i < req.changes.length; i++) {
Expand Down Expand Up @@ -597,7 +597,7 @@ delete it :). Add the following code into your server:
if (!req.dn.rdns[0].cn || !req.users[req.dn.rdns[0].cn])
return next(new ldap.NoSuchObjectError(req.dn.toString()));

var userdel = spawn('userdel', ['-f', req.dn.rdns[0].cn]);
var userdel = spawn('userdel', ['-f', req.dn.rdns[0].cn.value]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var userdel = spawn('userdel', ['-f', req.dn.rdns[0].cn.value]);
var userdel = spawn('userdel', ['-f', req.dn.rdns[0].attrs.cn.value]);


var messages = [];
userdel.stdout.on('data', function(data) {
Expand Down