(self, username, email, password=None, photo=None)
Creates and returns a User for the given username.
Creates and returns a User for the given username.
Creates and returns a User for the given username .
def create_new_user(self, username, email, password=None, photo=None):
        """Creates and returns a User for the given username."""
        try:
            user = get_auth_backend().register(
                username=username, email=email, password=password, photo=photo
            )
            signals.user_created.send_robust(sender=self.__class__, user=user)
            return user
        except UserExistsException as e:
            raise exceptions.UserExistsError(e)
        except AuthException as e:
            raise exceptions.BackendError(e)
def create_new_user ( self , username , email , password = None , photo = None ) : try : user = get_auth_backend ( ) . register ( username = username , email = email , password = password , photo = photo ) signals . user_created . send_robust ( sender = self . __class__ , user = user ) return user except UserExistsException as e : raise exceptions . UserExistsError ( e ) except AuthException as e : raise exceptions . BackendError ( e )