Manage Learn to apply best practices and optimize your operations.

Options for changing passwords

This tip offers developers two options for users changing their passwords -- a change password form or a user redirect.

A client of ours required a change Internet password feature on the Portal so that users can change their passwords whenever they want. So I made a change password form where the user can enter his old and new password and wrote an agent which checks the current logged in user and changes "HTTPPassword" field in the users document of names.nsf with the new password on webquerysave of the form.

This option, the code for which is below, works fine. But later I got another simpler way to do the same thing -- you can just redirect the user to "http://servername:port/names.nsf?changepassword" and use the default Notes feature to change the password. By using custom login forms and domcfg.nsf, you will be able to change the look and feel of the form as well.

Web Query Save:

Sub Initialize

 On Error Goto hell
 Dim session As New NotesSession
 Dim Empdoc As NotesDocument
 Dim namesdb As New NotesDatabase
("","names.nsf")
 Dim namesview As NotesView
 Dim Empname As New NotesName
(session.EffectiveUserName)
 Dim doc As NotesDocument
 Set db =session.CurrentDatabase
 Set doc=session.DocumentContext
 Set namesview=namesdb.
GetView("($VIMPeople)")
 If Not namesview Is Nothing Then
  Set EmpDoc=namesview.
GetDocumentByKey(Empname.Abbreviated)
  If Not empdoc Is Nothing Then
   empdoc.HTTPPassword=doc.NewPass(0)
   empdoc.SaveOptions="1"
   Call empdoc.ComputeWithForm(True,True)
   Call empdoc.save(True,True)  
   
  End If
 End If
 Exit Sub
hell: Print Error() & "..............." & Erl()
 Exit Sub
End Sub

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Hemang Kapadia. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our bimonthly tip contest and you could win a prize and a spot in our Hall of Fame.

This was last published in July 2005

Dig Deeper on Lotus Notes Domino Password Management

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close