Hi all,
How can I delete one member that belongs to several groups? I am looking for a user friendly way, that is, have a pop up window for the user to enter the name of the member, and clicks Ok button, then it will loop thru all of the groups that a member belongs to and remove that particular member, then update the group (form) as well as the view?
Any input will be appreciated it!
Thanks,
Mike Woo
Subject: Use Domino Administrator
-
Start Administrator.2. Choose People & Groups tab - Groups.
-
Choose Tools - Groups - Manage…
-
Highlight the name of the user in left box.
-
Click Show me: Only member hierarchies. Groups of which user is a member appear in the right box.
Subject: Re: Use Domino Administrator
Hi Lawrence,
I have implemented my own db and it does not have that feature.
thanks,
Mike Woo
Subject: RE: Re: Use Domino Administrator
Mike, the feature Lawrence refers to is independent of any application you may or may not create; it’s part of the Domino admin client, and it will show you what groups a member is in. However, you asked for a way to do it programmatically. Using the notessession class’s usergroupnamelist property should make this easy – as long as you ignore the username and */0rg entires.
Subject: Where is that part at?
Hi Bruce,
Do you know what script does that part belong to? The part that Lawrence was pointing out? I don’t have access to the adminisistrator, and not sure how where it is located at?
thanks,
Mike Woo
Subject: Then you’re out of luck – sort of
If you don’t have the admin client installed on your machine, then you simply don’t have access to that feature. Your question seems to be how you programmatically access the code that does that, and since it’s a part of the client software itself, and AFAIK isn’t exposed programmatically, the answer is No.
Going back to your original post, you want to programmatically delete a user from ALL groups they’re in. Why? If the user has left the company and no longer should be a Notes user in your domain, the admin would terminate them using an automatic process that removes them entirely, including group memberships as a subset of the process. If you really do, however, want to delete them from all groups while still leaving them registered as a member of the domain, then that can be done programmatically, and is actually a lot easier than the frequently-asked question “How do I list all groups they’re in?” (That requires recursing through nested groups if the domain has any.)
All you have to do is write an agent in the NAB which runs against all docs in either the Groups or ($VIMGroups) views which deletes the desired name from ALL groups – whether it’s there or not. Since this requires prompting the user for a name, you’ll have to write it in LS (or kluge a parameter-passing construct to do it in Formula) to avoid being prompted once per document instead of once. You should be able to use Evaluate to do the name deletion; this is a lot easier in formula than in script:
dim memList as variant
'getting view, getting NameToKill, and looping through docs skipped…
memList = Evaluate(“@trim(@replace(Members; " & NameToKill & “; “”””))", doc)
doc.members = memList(0)