Tuesday, March 29, 2011 at 1:07 AM.
river2Suite.utilities.initMembersRoot
on initMembersRoot () {
<<Changes
<<3/27/11; 6:39:08 PM by DW
<<Created. Add all existing River2 users to members.root, if they are not already present. We just copy the password. If the password is empty, we make one up.
local (adrdata = river2suite.init (), adruser);
for adruser in @adrdata^.users {
username = nameof (adruser^);
password = adruser^.prefs.password;
if sizeof (password) == 0 {
password = string.getrandompassword (8)};
try {
adrmember = opmlEditor.member.initMember (username, flcreate:false)}
else {
adrmember = opmlEditor.member.initMember (username, flcreate:true);
adrmember^.prefs.password = password}}};
bundle { //test code
initMembersRoot ()}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.