def clean(self):
        """
        Checks for the identification and password.

        If the combination can't be found will raise an invalid sign in error.

        """
        identification = self.cleaned_data.get('identification')
        password = self.cleaned_data.get('password')

        if identification and password:
            self.user_cache = authenticate(identification=identification, 
                                password=password)
            if self.user_cache is None:
                raise forms.ValidationError(_(u"Please enter a correct "
                        "username or email address and password. "
                        "Note that both fields are case-sensitive."))
        return self.cleaned_data
def clean ( self ) : identification = self . cleaned_data . get ( 'identification' ) password = self . cleaned_data . get ( 'password' ) if identification and password : self . user_cache = authenticate ( identification = identification , password = password ) if self . user_cache is None : raise forms . ValidationError ( _ ( u"Please enter a correct " "username or email address and password. " "Note that both fields are case-sensitive." ) ) return self . cleaned_data
Checks for the identification and password.

        If the combination can't be found will raise an invalid sign in error.