# How to modify authentication to use against a bespoke database schema

**URL:** <https://www.ruby-forum.com/t/how-to-modify-authentication-to-use-against-a-bespoke-database-schema/173114>\
**Category:** Rails\
**Created:** [August 3, 2009, 10:14am UTC](https://www.ruby-forum.com/t/how-to-modify-authentication-to-use-against-a-bespoke-database-schema/173114 "2009-08-03T10:14:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 3, 2009, 10:14am UTC](https://www.ruby-forum.com/t/how-to-modify-authentication-to-use-against-a-bespoke-database-schema/173114/1 "2009-08-03T10:14:28Z")

</div>

Hi all,

I am a little stuck for documentation. I am attempting to use  
authlogic in a project that is a mini app added to a much larger,  
established system. This system has a different way of storing user  
login information coming from multiple tables to that which is  
defaulted in authlogic.

It also uses three login fields (company id, user id and password)  
rather than the authlogic email or login field.

My problem is that I can’t find any documentation to help me figure  
our how to configure authlogic to authenticate against the existing  
system’s schema. I see OpenID addons but surely there must be tons of  
people using authlogic in code that has to be compatible with an  
existing database? How many greenfield sites are there these days?

I think that I need to modify the User model and fiddle around with  
acts\_as\_authentic. But if anyone can give me any pointers I would  
greatly appreciate it. My problem is that I am completely ignorant  
about the authlogic details. I have read through several tutorials and  
can get a basic authlogic installation up and running, but that’s  
using the authlogic way of authenticating, not adapting authlogic to  
fit and existing shoe.
