×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Custom login screen?

Custom login screen?

Custom login screen?

(OP)
Hi Filemakerians,

I want to create a login screen that checks usernames and passwords in a user database before the script redirects to the main database.

I'm a newbie, and not ashamed to tell.

Anyone outhere who can help me out? Please? Anyone? Hello????? Heeeeeeeeeeelp!

Ruben

RE: Custom login screen?

A password page can be as simple a new layout in your main database.  

Create a new page with a user login entry field. Then write a startup script.  The startup script needs to be setup to run automatically when the database is open.  

To do this go to Edit, Preferences, Document, and select When Opening run at startup, "Startup script".

You need a user input user name field and pass word field. We will compare their input with the authorized user database.

The startup script needs a few key components in it.

USER ABORT OFF
TOGGLE STATUS AREA(off,locked)

//(turn this on while writing and designing the script. We don't want to allow the user the ability to by pass our startup script.)//

Go to Layout( login)
pause script

//(the script pauses to allow the user to input their user name and password. The user then would click a Continue button, which directs the script to resume.)//

Loop
exit loop if(user login = user login verify

//(setup a relationship to verify the user input password with the database password content.  The user name is this side of the relationship and the password is the item being verified through the relationship. If the user name is input incorrectly, the password will not be valid so the login will fail if the password or user name is incorrect.)//

else
Setfield(user name, "")
Setfield(user password, "")
Show Message(exit, continue, "The user name and password cannot be found.  You may select continue to try again or Exit to end this session".
if(Status(currentmessagechoice)= 2
exit application
end if


//(The show message dialog allows you to give them another chance to reenter the user name and password. if the user selects button 1, there is no action defined to the script will resume.  Selection of the second button will exit the application.)//

This is is the basics.  We want the user to be caught in an endless loop unless they choose exit or have the right password.  

I'm using FM 6.0 developer.  They added a Show Dialog feature to it.  (I didn't have the previous version so I don't know when it came to the program)  This Show Dialog has a password feature built in that changes the password entry to *****.  It would basically work the same as above where the database opens to a harmless screen with no navigation buttons on it.

Other things to consider are any other files in your solution.  What if the user opens the user password file and not your primary file?

To prevent this, every file in your solution should have a startup script.  This startup script will simply tell the the primary file to: Open(Primary file Name) This will force the login script to run. This script should also have USER ABOUT OFF and TOGGLE STATUS AREA(off,locked)

I'm likely forgetting something here, but this gives you a start.

I hope this help you.

Marty

RE: Custom login screen?

..this is instant web publishing?
IF NOT it is as easy as creating a page with a 2 text form-fields on it...no scripts needed.
BTW: running sripts on the web = drinking olive oil to see what happens......"it" will hit the fan :D

RE: Custom login screen?

ooops just saw this.....nm if you are not talkin about the web go with the script..just saty close to the bathroom :)
good luck

RE: Custom login screen?

(OP)
Marty,

You've been a great help. Thanks!

Ruben

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close