How to allow the user to delete the iNotes profile in iNotes

  • 06 Dec, 2012

Steps:                                                                      
1. Create a database on the server (with any name e.g. BagOTrix)        
2. Create an agent (using the following LotusScript) that is  scheduled to Run “Never” with a target of None                                                                                              
Sub Initialize()
On Error GoTo ErrorLand

Dim session As New NotesSession
Dim thisDB As NotesDatabase
Dim targetDB As NotesDatabase

Dim targetServer As String
Dim targetDBStr As String

Dim docContext As NotesDocument
Dim prof As NotesDocument

Dim errorStr As String
errorStr = “”

Set docContext = session.Documentcontext

targetServer = StrRight(docContext.HTTP_Referer(0),“//”) ’ gets rid of
http/https
targetServer = StrLeft(targetServer, “/”)
targetDBStr = StrLeft(docContext.HTTP_Referer(0), “.nsf”)
targetDBStr = StrRight(targetDBStr, targetServer + “/”) + “.nsf”
’Print “
targetServer: “ + targetServer + “
targetDB: “ +

targetDBStr

Set targetDB = session.Getdatabase(targetServer, targetDBStr, false)
Set prof = targetDB.Getprofiledocument(“iNotesProfile”)
’Print prof.Universalid
Call prof.Remove(True)

If (errorStr = “”) Then
GoTo Success
Else
GoTo Failure
End If

End
ErrorLand:
errorStr = “Got error “ & Error$ & “ on line “ & CStr(Erl)
Resume Next
Success:
Print “”
Print “Your profile document has now been deleted from database: “ +
targetDBStr + “ on server: “ + targetServer
Print “”
End
Failure:
Print “”
Print “

An error occurred while deleting the profile document from
database: “_
+ targetDBStr + “ on server: “_
+ targetServer + “:
“ + errorStr + “


Print “”

End

End Sub

3. Set Anonymous Access to the database to ‘No access’, and default access to Reader.
4. Send an email to the iNotes user with a link to the agent on the server for e.g http://acme.mul.ie.ibm.com/BagOTrix.nsf/DeleteMyiNotesProfile?Openagent where “acme.mul.ie.ibm.com” will be your servers fully qualified hostname (FQHN) and “BagOTrix.nsf” is the name of the database you created earlier.        
5. When the end user clicks on the link they may be asked to log in again and then the agent will delete the profile document from their mail database

From TN1512367

Related Posts

Migrating messages from Domino to Google using IMAP

  • 20 Feb, 2022

It's only for messages. No calendar migration Imapsync command is a tool allowing incremental and recursive imap transfers from one mailbox to another. If you don't understand the previous sentence,

Migrating messages from Domino to Google using IMAPRead More

Domino V12 and Verse 2.1 How to add a Photo URL

  • 08 Jun, 2021

Today i setup a Domino V12 server just for test some new features. A customer ask to use photos on Verse hosting photos on Domino. Domino V12 comes with Verse 2.0. I just download the version 2.1 of

Domino V12 and Verse 2.1 How to add a Photo URLRead More

Notes / Domino is forever

  • 04 Feb, 2021

Yesterday it seemed like it would be an ordinary working day but a client called me informing about the expiration of a certifier. It would be normal to resolve the problem with the re-certification p

Notes / Domino is foreverRead More