app/controllers/users_controller.rb
# Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
def reset
        @user = User.find_by_reset_code(params[:reset_code]) unless params[:reset_code].nil?
        if request.post?
            if @user.update_attributes(:password => params[:user][:password], :password_confirmation => params[:user][:password_confirmation])
                self.current_user = @user
                @user.delete_reset_code
                flash[:notice] = "Password reset successfully for #{@user.email}"
                redirect_back_or_default('/')
            else
                render :action => :reset
            end
        end
    end
def reset @user = User . find_by_reset_code ( params [ :reset_code ] ) unless params [ :reset_code ] . nil? if request . post? if @user . update_attributes ( :password => params [ :user ] [ :password ] , :password_confirmation => params [ :user ] [ :password_confirmation ] ) self . current_user = @user @user . delete_reset_code flash [ :notice ] = "Password reset successfully for #{@user.email}" redirect_back_or_default ( '/' ) else render :action => :reset end end end
Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead