Ticket #13125: login_required_active.diff

File login_required_active.diff, 496 bytes (added by Matt Dennewitz <mattdennewitz@…>, 14 years ago)

Add "is_active" check to login_required

  • django/contrib/auth/decorators.py

     
    3535    to the log-in page if necessary.
    3636    """
    3737    actual_decorator = user_passes_test(
    38         lambda u: u.is_authenticated(),
     38        lambda u: u.is_authenticated() and u.is_active,
    3939        redirect_field_name=redirect_field_name
    4040    )
    4141    if function:
Back to Top