public function removeUserById($userId)
    {
        $updtableProperties = Updatable::getInstance()
            ->table($this->getUserPropertiesDefinition()->table())
            ->where(
                "{$this->getUserPropertiesDefinition()->getUserid()} = :id",
                [
                    "id" => $userId
                ]
            );
        $this->propertiesRepository->deleteByQuery($updtableProperties);

        $this->userRepository->delete($userId);

        return true;
    }
public function removeUserById($userId)
    {
        $updtableProperties = Updatable::getInstance()
            ->table($this->getUserPropertiesDefinition()->table())
            ->where(
                "{$this->getUserPropertiesDefinition()->getUserid()} = :id",
                [
                    "id" => $userId
                ]
            );
        $this->propertiesRepository->deleteByQuery($updtableProperties);

        $this->userRepository->delete($userId);

        return true;
    }
public function removeUserById ( $ userId ) { $ updtableProperties = Updatable :: getInstance ( ) -> table ( $ this -> getUserPropertiesDefinition ( ) -> table ( ) ) -> where ( "{$this->getUserPropertiesDefinition()->getUserid()} = :id" , [ "id" => $ userId ] ) ; $ this -> propertiesRepository -> deleteByQuery ( $ updtableProperties ) ; $ this -> userRepository -> delete ( $ userId ) ; return true ; }
Remove the user based on his user id.

@param mixed $userId
@return bool
@throws \Exception
Remove the user based on his user id .