Added condition to hosting form to show message for account that have not yet been validated after account creation
This commit is contained in:
		
					parent
					
						
							
								b8463360b5
							
						
					
				
			
			
				commit
				
					
						707d8e7370
					
				
			
		
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -24,6 +24,8 @@ class HostingUserLoginForm(forms.Form):
 | 
			
		|||
        is_auth = authenticate(email=email, password=password)
 | 
			
		||||
        if not is_auth:
 | 
			
		||||
            raise forms.ValidationError("Your username and/or password were incorrect.")
 | 
			
		||||
        elif is_auth.validated == 0:
 | 
			
		||||
            raise forms.ValidationError(_("Your account is not activated yet."))
 | 
			
		||||
        return self.cleaned_data
 | 
			
		||||
 | 
			
		||||
    def clean_email(self):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue