def find_user(self, username=None, email=None):
if username:<EOL><INDENT>return (<EOL>self.get_session.query(self.user_model)<EOL>.filter(func.lower(self.user_model.username) == func.lower(username))<EOL>.first()<EOL>)<EOL><DEDENT>elif email:<EOL><INDENT>return (<EOL>self.get_session.query(self.user_model).filter_by(email=email).first()<EOL>)<EOL><DEDENT>
Finds user by username or email