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
 Dim namesview As NotesView
 Dim Empname As New NotesName
 Dim doc As NotesDocument
 Set db =session.CurrentDatabase
 Set doc=session.DocumentContext
 Set namesview=namesdb.
 If Not namesview Is Nothing Then
  Set EmpDoc=namesview.
  If Not empdoc Is Nothing Then
   Call empdoc.ComputeWithForm(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 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.

Dig Deeper on Lotus Notes Domino Password Management



  • iSeries tutorials'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 ...