svn commit: samba r20176 - in branches/SAMBA_4_0/testprogs/ejs: .

mimir at samba.org mimir at samba.org
Thu Dec 14 22:14:08 GMT 2006


Author: mimir
Date: 2006-12-14 22:14:07 +0000 (Thu, 14 Dec 2006)
New Revision: 20176

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20176

Log:
Info method returns null object if the user is not found.


rafal


Modified:
   branches/SAMBA_4_0/testprogs/ejs/ejsnet.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/ejsnet.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/ejsnet.js	2006-12-14 22:12:53 UTC (rev 20175)
+++ branches/SAMBA_4_0/testprogs/ejs/ejsnet.js	2006-12-14 22:14:07 UTC (rev 20176)
@@ -30,12 +30,18 @@
 	return -1;
 }
 
+
 var info = usr_ctx.Info(options.ARGV[1]);
-println("UserInfo.AccountName = " + info.AccountName);
-println("UserInfo.Description = " + info.Description);
-println("UserInfo.FullName = " + info.FullName);
-println("UserInfo.AcctExpiry = " + info.AcctExpiry);
+if (info != null) {
+	println("UserInfo.AccountName = " + info.AccountName);
+	println("UserInfo.Description = " + info.Description);
+	println("UserInfo.FullName = " + info.FullName);
+	println("UserInfo.AcctExpiry = " + info.AcctExpiry);
+} else {
+	println("Null UserInfo returned - account unknown");
+}
 
+
 var status = usr_ctx.Delete(options.ARGV[1]);
 if (status.is_ok != true) {
 	println("Failed to delete user account " + options.ARGV[1] + ": " + status.errstr);



More information about the samba-cvs mailing list