# File app/controllers/authorize_controller.rb, line 98
  def reset_password
    flash[:notice] = nil
    if request.post?
    @user = User.find_by_email(params[:user][:email])
      if @user
        @new_password = newpass(8)
        @user.password = @new_password
        @user.flag = 'RESET'
        @user.save
        Notifier.deliver_reset_password_email(@user, @new_password)
        flash[:notice] = "Password reset and e-mail with new password sent."
        redirect_to :controller => 'metarep', :action => 'browser'
      else
        flash[:notice] = "User with this e-mail address not found."
      end
    end
  end