Forum: Ruby on Rails Problem with change_password action in LoginEngine

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Juan Lupión (Guest)
on 2006-01-22 18:25
(Received via mailing list)
Hi, I just setup the Login engine and everything seems to be
working... but the change_password action.  The fact is that the user
receives the mail telling him to visit the app's change_password page
in order to enter a new password, but I get an undefined method error
in my controller when rendering <%= error_messages_for 'user' %>.

Tracking down the issue, I found that the change_password method
doesn't retrieve the user object, and the solution is to call the
user? method, from lib/login_engine/authenticated_system.rb, like

  def change_password
     return if generate_filled_in
     if user?
        if do_change_password_for(@user)
           # since sometimes we're changing the password from within
another action/template...
           #redirect_to :action => params[:back_to] if params[:back_to]
           redirect_back_or_default :action => 'change_password'

Is this a bug in the LoginEngine (and maybe the Login Generator code)
or did I screw something?

This topic is locked and can not be replied to.