# Migration from the "Restful Authentication" to "Authlogic"

**URL:** <https://www.ruby-forum.com/t/migration-from-the-restful-authentication-to-authlogic/180617>\
**Category:** Rails\
**Created:** [December 23, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/migration-from-the-restful-authentication-to-authlogic/180617 "2009-12-23T13:50:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [December 23, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/migration-from-the-restful-authentication-to-authlogic/180617/1 "2009-12-23T13:50:36Z")

</div>

Hi,  
I am using Authlogic for authentication.  
Previously our application having a “Restful Authentication”. We have  
users who are created by using the “Restful Authentication”.

My problem is these users will not able to login with Authlogic as the  
password encryption methods are different for both and I am getting  
“Password not valid” error.  
So I searched for that and I got the solution like this:- Add following  
lines in the users.rb  
"# app/models/user.rb  
class User \< ActiveRecord::Base  
acts\_as\_authentic do |c|  
c.act\_like\_restful\_authentication = true  
end  
end  
"  
Here is the link that I got the solution:-

[http://www.binarylogic.com/2008/11/23/tutorial-easily-migrate-from-restful\_authentication-to-authlogic/](http://www.binarylogic.com/2008/11/23/tutorial-easily-migrate-from-restful_authentication-to-authlogic/)

By adding the code in the users.rb the existing users are able to login  
but whenever I am creating a new user, it is not allowing me to log in.  
It is giving me error “Password not valid”

Can anyone tell me how should I fix this?

It is very urgent.

Thanks,  
Tushar G…
