Wiki

Case Status Kiln
Log In

Wiki

 
Procedures»Adding User Management (Forms …
  • RSS Feed

Last modified on 8/28/2013 11:28 AM by User.

Tags:

Adding User Management (Forms Authentication) to a System

Add the following schema or something similar to your database:

CREATE TABLE UserRoles(
    UserRoleId int NOT NULL CONSTRAINT pkUserRoles PRIMARY KEY,
    RoleName nvarchar( 50 ) NOT NULL CONSTRAINT uniqueRoleName UNIQUE
);
GO
CREATE TABLE Users(
    UserId int NOT NULL CONSTRAINT pkUsers PRIMARY KEY,
    EmailAddress nvarchar( 50 ) NOT NULL CONSTRAINT uniqueEmailAddress UNIQUE,
    Salt int NOT NULL,
    SaltedPassword varbinary( 20 ) NULL,
    RoleId int NOT NULL CONSTRAINT fkUsersToUserRoles REFERENCES UserRoles,
    LastLoginDateTime datetime NULL,
    MustChangePassword bit NOT NULL,
    Deleted bit NOT NULL
);
GO

Add a class called UserManagement to your Library/Configuration/Providers folder. Implement either FormsAuthCapableUserManagementProvider or StrictFormsAuthUserManagementProvider.