#NEWLINE# def _change_user_credentials( self , * args , **kwargs ) : #NEWLINE# #INDENT# 'Change user credentials, based on the passed args and kwargs.' #NEWLINE# self . _is_active = kwargs . get ( 'is_active' , True ) #NEWLINE# self . _is_superuser = kwargs . get ( 'is_superuser' , False ) #NEWLINE# self . _is_staff = kwargs . get ( 'is_staff' , False ) #NEWLINE# self . _is_user = kwargs . get ( 'is_user' , False ) #NEWLINE# if any ( [ self . _is_superuser , self . _is_staff , self . _is_user ] ) : #NEWLINE# #INDENT# self . _is_anonymous = False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _is_anonymous = True