<s> import logging <EOL> from Mojo . Auth . SessionManager import SessionManager <EOL> from Mojo . Auth . AuthManager import authenticate <EOL> def login_assistant ( thisUser , password , request ) : <EOL> """<STR_LIT>""" <EOL> logging . debug ( '<STR_LIT>' % thisUser ) <EOL> if thisUser is not None : <EOL> is_authenticated = authenticate ( thisUser , password ) <EOL> logging . debug ( '<STR_LIT>' % str ( is_authenticated ) ) <EOL> if is_authenticated : <EOL> SessionManager ( request ) . _login ( thisUser ) <EOL> return True <EOL> else : <EOL> return False <EOL> else : <EOL> return False <EOL> def logout_assistant ( request ) : <EOL> """<STR_LIT>""" <EOL> SessionManager ( request ) . _logout ( ) <EOL> return True </s>
