#NEWLINE# def get_user_by_password( self , auth_id , password , remember = False , save_session = True , silent = False ) : #NEWLINE# #INDENT# 'Returns a user based on password credentials.\n\n        :param auth_id:\n            Authentication id.\n        :param password:\n            User password.\n        :param remember:\n            If True, saves permanent sessions.\n        :param save_session:\n            If True, saves the user in the session if authentication succeeds.\n        :param silent:\n            If True, raises an exception if auth_id or password are invalid.\n        :returns:\n            A user dict or None.\n        :raises:\n            ``InvalidAuthIdError`` or ``InvalidPasswordError``.\n        ' #NEWLINE# if remember : #NEWLINE# #INDENT# self . unset_session ( ) #NEWLINE# #UNINDENT# self . _user = self . store . validate_password ( auth_id , password , silent = silent ) #NEWLINE# if ( not self . _user ) : #NEWLINE# #INDENT# self . _user = _anon #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if save_session : #NEWLINE# #INDENT# self . set_session ( self . _user , remember = remember ) #NEWLINE# #UNINDENT# #UNINDENT# return self . _user_or_none ( )