How register an user(using NotesRegistration class) an save the id to File Location and to a Notes Database?

Subject: How register an user(using NotesRegistration class) an save the id to File Location and to a Notes Database?