#NEWLINE# def _check_password( self , nickname , password ) : #NEWLINE# #INDENT# ' Check user brl_user/password ' #NEWLINE# try : #NEWLINE# #INDENT# user = self . store . read_user ( nickname ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# raise AuthenticationException ( 'Wrong user or password' ) #NEWLINE# #UNINDENT# if user . active : #NEWLINE# #INDENT# if ( not user . valid_password ( password ) ) : #NEWLINE# #INDENT# raise AuthenticationException ( 'Wrong user or password' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise NotActivatedUser ( 'User email is not confirmed! We have sent an email to your account' )