From ecd5e432b708f27106dd8fbd8a2a2567fd18cff1 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 13 Dec 2006 23:37:22 +0000 Subject: r20163: Return null object if no user is found. rafal (This used to be commit af539fec4acb3ad78b8f0fa4f7c2f4e6cebea0b7) --- source4/scripting/ejs/ejsnet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/scripting/ejs') diff --git a/source4/scripting/ejs/ejsnet.c b/source4/scripting/ejs/ejsnet.c index 5daf478506..8662ae2caf 100644 --- a/source4/scripting/ejs/ejsnet.c +++ b/source4/scripting/ejs/ejsnet.c @@ -367,11 +367,15 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv) status = libnet_UserInfo(ctx, mem_ctx, &req); if (!NT_STATUS_IS_OK(status)) { ejsSetErrorMsg(eid, "%s", req.out.error_string); + + /* create null object to return */ + mprUserInfo = mprCreateNullVar(); + goto done; } /* create UserInfo object */ mprUserInfo = mprObject("UserInfo"); - + mprAccountName = mprString(req.out.account_name); mprFullName = mprString(req.out.full_name); mprDescription = mprString(req.out.description); -- cgit