Log in using our existing database

Topics: General, Writing modules
Feb 23, 2015 at 10:53 AM
We have and existing database of users, with 2 levels of roles.

We would live them to be able to log into Orchard using their existing credential.

1) How would we go about implementing that? Could a custom log in class use our existing database?

2) Would it then create a new user in Orchard?

3) Is this a good starting point or is there something else already out there doing something similar?



?
Developer
Feb 23, 2015 at 3:40 PM
  1. You could write your own login controller that validates the credentials against your database, and set a forms authentication cookie if successful.
  2. No, you would have to create an Orchard user yourself (after checking if the user logging in doesn't already have an Orchard user account).
  3. Seems like a good starting point in case you don't want to create Orchard user accounts. Simply linking Orchard user accounts to your own user store is simpler, but if you don't want that then you'll have to do something like discussed in the thread you mentioned.