"UserLogin" Stored Procedure

Description:

This stored procedure authenticates a user against the Users table credential store. If the email/password combination is found, the user's UserName is returned.

Definition:
        
   CREATE PROCEDURE Portal_UserLogin
   (
       @Email    nvarchar(100),
       @Password nvarchar(50),
       @UserName nvarchar(100) OUTPUT
   )
   AS
   
   SELECT
       @UserName = Name
   
   FROM Portal_Users
   
   WHERE
       Email = @Email
     AND
       Password = @Password
        
Database Tables Used:

Users:  The Users table contains the user crendential information used for forms-based authentication.