Manage Learn to apply best practices and optimize your operations.

Change Internet Password Of Pnab By Users Themselves,And Keep A Trace For Administrator

As a Notes administrator always doesn't like users to change PNAB value,even
the user has the authority to change some field in PNAB.
Especially, the HTTPPassword field of PNAB if the user like to read his mails
by Browser.

This tip allow user change their internet password of PNAB by a button in their
mailbox directly and administrator can keep a record that when the user change
their password.....
.
If you want to make a record when user change their password, you should create
a database firstly.
(It's named login.nsf in this sample, The form named PasswdLog includes the
following field : PName,PDate,Ppwd ).
Secondly,delete the single quote of the following code for running the code.
Create a button on the view or folder which you like in templete mail file
(mailc46.ntf).
(I put the button at the folder named ($Inbox))
Paste following code to the button. then replace design of user's mail file by
the templete file .


Sub Click(Source As Button)
Dim session As New notessession
Dim Db As notesdatabase
Dim dbPNAB As notesdatabase
Dim viewPeople As notesview
Dim docPerson As notesdocument
' Dim dbLog As notesdatabase ' if you want to make a record when
user change their password
' Dim docLog As notesdocument
Dim Webuser As String
Dim pwd As String
Dim pwd2 As String

Webuser=session.CommonUserName
Set Db = Session.CurrentDatabase
Set dbPNAB = session.GetDatabase(Db.Server,"names.nsf")
' Set dbLog = Session.GetDatabase(Db.Server, "login.nsf") ' login.nsf :
This file allow you to keep a record for user
Set viewPeople=dbPNAB.GetView("($NamesfieldLookup)")
Set docPerson=viewPeople.GetDocumentByKey(Webuser)

Set docLog=New NotesDocument(dbLog)

Goto RequestPwd

RequestPwd:
pwd=Inputbox$("Please Enter a New Password" ,"Title" )
pwd2=Inputbox$("Please Re-enter again" ,"Title" )
If pwd<> pwd2 Then
Messagebox "Not Correct, you must try again" ,16,"Error"
Goto RequestPwd
Else
Goto ChangePwd
End If

ChangePwd:
docPerson.HTTPPassword=pwd
' For keep change passwd log into login.nsf
' docLog.Form="PasswdLog" ' the form name of login.nsf
' docLog.PName=Webuser
' docLog.PDate=Now()
' docLog.Ppwd=pwd
' Call docLog.save(True,True)
Call docPerson.ComputeWithForm( False, False )
Call docPerson.Save( False, True )
Messagebox "Changed successfully!" ,64,"Complete"

End Sub

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

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

SearchContentManagement

Close