Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 740821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:33:38+00:00 2026-05-14T08:33:38+00:00

im using FriendlyFormPlugin, but would like to retrieve the username that was input as

  • 0

im using FriendlyFormPlugin, but would like to retrieve the username that was input as part of the request.params, but its no longer there when i check. this way i can set the default for username if the password is incorrect. thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:33:38+00:00Added an answer on May 14, 2026 at 8:33 am

    I think what you need to do is to setup a post login handler action when you setup the middleware. In that action you can then check params, set a session var, etc. I had to hook into here in order to create a message to the user that their login had failed. I check for a ‘login_failed’ param on the login form.

        def post_login(self):
        """ Handle logic post a user's login
    
        I want to create a login_handler that's redirected to after login. This would
        check 
    
        - if user was logged in, if not then send back to login
        - if user is admin, go to job list
        - adjust the max age on the existing cookie to XX remember me timeframe
    
        """
        if auth.check(not_anonymous()):
            log.debug('checked auth')
        else:
            # login failed, redirect back to login
            log.debug('failed auth')
            redirect_to(controller="root", action="login", login_failed=True)
    
        # expire this cookie into the future
        ck = request.cookies['authtkt']
        response.set_cookie('authtkt', ck,
                max_age=60*60*24*7,
                path='/'
        )
    
        redirect_to(controller="job", action="list")
    

    In response for more details, too big to add as another comment:

    So I’ve got a few things you can look at. First, this is my docs I’m writing as a repoze ‘summary’ to help explain to other devs how this stuff works/terminology used:

    http://72.14.191.199/docs/morpylons/auth_overview.html

    I started out using the repoze sql quickstart plugin:
    http://code.gustavonarea.net/repoze.what-quickstart/

    I then ripped out their setup_sql_auth and modified it for our own needs since we do both SQL and LDAP auth in our apps. Go make sure to look at the plugin source for setup_sql_auth and go through it until you really understand what it’s doing.

    and since you asked on middleware config…

      app = setup_morpace_auth(app, User, Group, Permission, meta.Session,
                          post_login_url='/root/post_login',
                          post_logout_url='/login',
                          log_level='debug',
                          log_file='stdout'
                          )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using Jenkins or Hudson I would like to create a pipeline of builds with
Using the current request I can get the URL hostname with: HttpContext.Current.Request.Url.Host But -
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using C#, I need a class called User that has a username, password, active
Using Microsoft SQL Server 2005, is there any way to see when a table
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.