LotusScript to Make a new web user able to log in immediately

Bill offered some advice yesterday about a problem I’ve been having with new user registrations for Defectr.

What was happening was that a new user would register, everything would work fine but it took up to 15 minutes for the new account to work. I thought I had tried all combinations of solution but am also running the Defectr registrations in a Directory Assistance NAB (ie not the primary NAB on the server) so assumed that that was the source of the problem. But Bill’s posting spurred me to have another quick look and it seems like I’ve got it fixed now.

All of the work I had been doing was around refreshing views in the NAB in which the users were being created, it never occurred to me to refresh the same views in the main NAB but when I did the new account worked straight away. I have no idea why this would be the case, any idea you admin types?

Anyway, this is the code I now run when a new user registers:

Option Public Option Declare Use "OpenLogFunctions" Use "slnnotesdll" Sub UpdateNAB On Error Goto Whoops Dim commander As New nnotesdll Dim sess As New NotesSession Dim strError As String Dim server As String Dim scommand As String Dim strResponse As String Server = sess.CurrentDatabase.Server sCommand = |load updall names.nsf -t "($ServerAccess)" -r| strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = |load updall names.nsf -t "($Users)" -r| strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = |dbcache flush| strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = "Tell Adminp Process People" strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = "Show nlcache reset" strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Exit Sub Whoops: Call LogError() gResponse = "ERROR: " + Error Exit Sub End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Tags: Show-N-Tell Thursday

Share