$$Loginuserform

hi all,

I am developing a login for website using $$Loginuserform. When the user enters a username and password , i want a process to run in the back ground and check if the username and password exist. If it does exist, take the user to their user profile...

Was curious to know how to do this?

Any help greatly appreciated,
Jay
LVL 10
jaggernatAsked:
Who is Participating?
 
ZvonkoSystems architectCommented:
So far you have no profiles so let us discuss about NEW USER image.
When a user clicks on that image you could open a Form to compose a new user document profile.
The formula is simmelar as the last formula for ApplyJobs Form:
@Command([Compose];"UserProfile")

For that does the editing user need not to be logged on. He can stay Anonymous.
When the user finished his entries for UserName, EmailAddress and Password in the Form "UserProfile", then you can run an Agent which lookups your server's names.nsf for such a UserName, and if not already present, then create a Person document for that user, encrypt his InternetPassword in his Person document, and first after that store the UserProfile document in your application database.
You can also block the activation of user creation and suspend it until he has responded to an email sent to his email address for account activation.
First after that all you can allow the user to logon to Domino and click on a image which already holds his username because he previously logged on. That image click opens the UserName from a prepared View of all UserNames in your application.

Does that all make sense to you?
I know it is too much for the beginning, but you cannot lookup Profile documents when you have none.



0
 
madheeswarCommented:
copy login form from domcfg.ntf

and in the $$return field place the redirect URL to person's document
0
 
Bozzie4IT ArchitectCommented:
Setup the customized login form.  The customization of the $$Return field is not something I would suggest, because this means you will always to to the user profile, for every appl. on your server.

Other possibilities include
- create an agent to open the correct profile document.  Call the agent using http://server/db.nsf/myAgent?Openagent&login  .  The user will be prompted to login, the agent executes under the correct user, and can redirect to the userprofile (or not)
- create a form , that retrieves the data of the correct user profile using @dblookups.  Also use the &login notation, to let your user login.
- ...

cheers,

Tom
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
ZvonkoSystems architectCommented:
Tom already mention it: it is a bad idea to change the logon behaviour for ALL user logins.

I understood your question like this:
1.) You have an application databas: Staff.nsf
2.) That database has a Form or a Page: Employment
3.) On that Form you have a link "Existing User: [LOG IN]"
4.) Clicking on that link or button or image should accept userid and password and open Users Profile Document.

Are those assumptions correct?

0
 
jaggernatAuthor Commented:
yes , perfect..
0
 
Bozzie4IT ArchitectCommented:
Then the link in the "Existing user: log in" button should point to
 http://server/db.nsf/myAgent?Openagent&login

The agent should have code like this:

dim s as new notessession
dim db as notesdatabase
dim profiledoc as notesdocument
set db = s.currentdatabase
'Set notesDocument = notesDatabase.GetProfileDocument( profilename$ [, uniqueKey$ ] )
set profiledoc = db.getprofiledocument( "TheProfileName", s.effectiveusername )
' profile will be created if it doesn't exist
print "[/" + db.filepath + "/_/"+profiledoc.universalid +"?Editdocument]"




0
 
Bozzie4IT ArchitectCommented:
The agent should have the "Run as webuser" property enabled for this to work.
0
 
ZvonkoSystems architectCommented:
Tom, why Agent?
0
 
Bozzie4IT ArchitectCommented:
Well, because it's a profile document (I assume it's an actual profile document)

Opening a form is of course also possible ...
0
 
ZvonkoSystems architectCommented:
When someone say Profile document it does not mean always the Profile documents hidden from views. It can be any sort of Configuration documents.

My intention was to open a Page at LOGIN click and decide in that Page where to redirect the user (after he correctly logged in). For example if a Profile Document does not exist for that user, then we can offer a Form to create a new Profile Document. If Profile is found, then simply open his personal Profile document.

Basicaly does the user never see the Page which contains the decision formulas for logged in users.

The loging can be a Session login or a browser BasicAuthentication login, it does not matter.

0
 
jaggernatAuthor Commented:
yeaa  thats a good idea zvonko...but  bozzie's solution sounds good too.


any idea ,,how we do the login authentication ??

thanks,
J

0
 
ZvonkoSystems architectCommented:
The login authentication is done by Domino. You have not to add anything to the login process.
When the user clicks on your LOGIN link, then he gets redirected to a Form with the ?openForm&login parameter. This parameter ensures that the user is logged in.
Anyway, if he was already logged in or he needs to log in, you have nothing to do with the login process.
The only thing you can trust is when the user reaches your Form that he is already logged in.
In that form you can run a formula and lookup its Profile document based on his @UserName. If the document is NOT found in that database where you manage the user Profiles, then you offer to the user a Form for creating a new Profile document.
If the Profile document is found for that user name, then simply do forward the user to his Profile document.
Basicaly does the user never see the document with the lookup and decission formula.

The Form can also be a Page because no user input is required in that decission formula.

If taht process is OK for you, then I can make the neccessary @Formula for you.

0
 
jaggernatAuthor Commented:
this is what i did exactly:

on the login.jpg ,i created a hotspot and pointed it to $$Loginuserfom (from domcfg.nsf).

now ,,once user logs in where should he go ..

thanks,
J
0
 
ZvonkoSystems architectCommented:
No no no.

The $$LoginUserForm is for ALL user authentication. That is wrong and dangerous approach.

0
 
jaggernatAuthor Commented:
so where do i point the login.jpg to?  once the user clicks login.jpg where should it go and what should it do?


thanks,
J
0
 
ZvonkoSystems architectCommented:
If you create a user.id for me and send it to the address in my EE profile, then I can support you directly in your database.
0
 
jaggernatAuthor Commented:
i can understand what you are saying..

lets break this down into chunks...

how do i proceed  with writing an Agent which lookups your server's names.nsf for such a UserName, and if not already present, then create a Person document for that user, encrypt his InternetPassword in his Person document??

thanks,
J
0
 
ZvonkoSystems architectCommented:
Is it possible for you to allow me to access your Server?
0
 
jaggernatAuthor Commented:
no zvonko...i am just a developer working on the client machine...i dont have access to server except for my login and password...

J
0
 
ZvonkoSystems architectCommented:
Ok, send me your email address and I can send you an example.
Or do you prefer doing it here on EE?
0
 
jaggernatAuthor Commented:
email is fine          :        jaggernat@yahoo.com

0
 
ZvonkoSystems architectCommented:
Here the detail answer:
The image hotspot link contained this URL: SelectUser?OpenPage&login

The page SelectUser contained only this one ComputedText formula:
"[<script>window.location='/"+@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")+"/UserProfiles/"+@ProperCase(@Name([CN];@UserName))+"?EditDocument'</script>]"

Of course has the View "UserProfiles" to be sorted by first column where the UserNames were contained in @ProperCase

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.