Set request variable when using LDAP authentication
request variable must be set when python version is 3
Fix
@@ -207,6 +207,8 @@ class LdapAuthenticationForm(AuthenticationForm):
def authenticate(self):
request = None
+ if sys.version_info[0] > 2:
+ request = self.request
username = self.cleaned_data.get('username') or ''
password = self.cleaned_data.get('password')
server = self.cleaned_data.get('server')
