Changeset - 9e4f0baa18e7
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2020-03-23 14:29:31
mads@kiilerich.com
Grafted from: 52919158ac08
login: clarify comments
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/login.py
Show inline comments
 
@@ -79,8 +79,8 @@ class LoginController(BaseController):
 
            # import Login Form validator class
 
            login_form = LoginForm()()
 
            try:
 
                # login_form will check username/password using ValidAuth and report failure to the user
 
                c.form_result = login_form.to_python(dict(request.POST))
 
                # form checks for username/password, now we're authenticated
 
                username = c.form_result['username']
 
                user = User.get_by_username_or_email(username)
 
                assert user is not None  # the same user get just passed in the form validation
 
@@ -102,6 +102,7 @@ class LoginController(BaseController):
 
                # Exception itself
 
                h.flash(e, 'error')
 
            else:
 
                # login_form already validated the password - now set the session cookie accordingly
 
                auth_user = log_in_user(user, c.form_result['remember'], is_external_auth=False, ip_addr=request.ip_addr)
 
                if auth_user:
 
                    raise HTTPFound(location=c.came_from)
0 comments (0 inline, 0 general)