Threesuns

Email

Contact

All Semesters

Semesters

All Courses

Courses

Rails II

CSYS2873

3 credits

Labs

Fancy Login Registration Page

Lab

100 points

Requirements

Application created with User authentication10
Login and Registration page created10
L.R. page allows users to register25
L.R. page allows users to login25
L.R. page does not show password confirmation field if users email address is already registered15
L.R. page does show password confirmation field if users email address is not already registered15
Total100 pts

Objective

To create a combination login / registration page

Instructions

For this lab you will create a single page that will allow a new user to register or a current user to login. What will make this interesting is that the page will only have a single form which needs to customize itself based on the information it is being given.

The setup is that users registering for our website need to provide an email address, password, and password confirmation. Users who have registered and are logging in need to provide their email address and password but no password confirmation. Because of the similarity in these two things we've decided to combine the login and registration forms into one.

On the login/registration page when the user provides their email address the system will need to decide if that email address belongs to a registered user or not. If there is already a registered user with that address then they are probably trying to login, so the password confirmation field should disappear and the form should submit for logging in. If the email address that the user is entering is not known to the system then it must be for a new user who needs to register, so the password confirmation field should be shown and the form should submit for creating a new user.

Extras