I want to have an employee be able to change the http password of a group of folks who only access our site via http. I have written the following code, which seems to work flawlessly w/ one exception- it is not forcing the person to change their password. The field “HTTPPasswordForceChange” is being set to “1” - if I do it manually in the NAB (edit the document, click the change password button and click the admin section force change) it works- We don’t want to give the individual author access to the NAB- this would be done from a button- and they could only change the applicator’s passwords- ALL of that is working. Ideas?
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As New NotesDatabase( "myserver","names.nsf" )
Dim view As NotesView
Set view = db.GetView("People")
Dim LogDB As New NotesDatabase( "myserver","IT Apps\SRS_IT_Requests.nsf" )
Dim LogDoc As NotesDocument
Dim AuthorName As String
AuthorName = s.UserName
' Get Applicator Number & verify
Dim BoxMessage As String
BoxMessage = "Please Enter 4 digit Applicator Number"
Dim BoxTitle As String
BoxTitle = "Change Password"
Dim GetName As String
GetName = Inputbox(BoxMessage,BoxTitle)
Dim Value As Boolean
Value = Len(GetName) = 4
'If not a 4 digit length- keep trying
Do Until Value = True
GetName = Inputbox(Boxmessage,BoxTiles)
Value = Len(GetName) = 4
Loop
Dim doc As notesdocument
Set doc = view.GetDocumentByKey(GetName)
If Not doc Is Nothing Then
doc.HTTPPassword = "password"
doc.HTTPPasswordForceChange = "1"
Dim chgdt As NotesItem
Set chgdt = doc.ReplaceItemValue("HTTPPasswordChangeDate",Now())
success = doc.ComputeWithForm( False, False )
If success Then
Call doc.Save( True, True )
End If
Set LogDoc = logDB.CreateDocument
logdoc.form = "PasswordChangeLog"
Dim AuthorsItem As New NotesItem(Logdoc,"Author",AuthorName,Authors)
LogDoc.dateCreated= Now()
logdoc.Applicator = GetName
Call LogDoc.Save(True,True)
Else
Msgbox "Not A Valid Applicator Number"
Exit Sub
End If
End Sub