def create
      unless @reset_request.valid?
        render 'new' and return
      end

      @user = User.find_by(email: @reset_request.email)
      if @user && @user.enabled? && @user.activated?
        @user.create_reset_digest
        @user.send_password_reset_email request.remote_ip
      elsif @user
        if !@user.enabled?
          User.send_disabled_reset_email(email, request.remote_ip)
        elsif !@user.active?
          User.send_inactive_reset_email(email, request.remote_ip)
        else
          User.send_missing_reset_email(email, request.remote_ip)
        end
      else
        User.send_missing_reset_email(email, request.remote_ip)
      end

      flash[:info] = 'An email with password reset information has been sent to you.'
      redirect_to main_app.root_url
    end
def create
      unless @reset_request.valid?
        render 'new' and return
      end

      @user = User.find_by(email: @reset_request.email)
      if @user && @user.enabled? && @user.activated?
        @user.create_reset_digest
        @user.send_password_reset_email request.remote_ip
      elsif @user
        if !@user.enabled?
          User.send_disabled_reset_email(email, request.remote_ip)
        elsif !@user.active?
          User.send_inactive_reset_email(email, request.remote_ip)
        else
          User.send_missing_reset_email(email, request.remote_ip)
        end
      else
        User.send_missing_reset_email(email, request.remote_ip)
      end

      flash[:info] = 'An email with password reset information has been sent to you.'
      redirect_to main_app.root_url
    end
POST /incline/password_resets