public function removeProperty($userId, $propertyName, $value = null)
    {
        $user = $this->getById($userId);
        if ($user !== null) {

            $updateable = Updatable::getInstance()
                ->table($this->getUserPropertiesDefinition()->table())
                ->where("{$this->getUserPropertiesDefinition()->getUserid()} = :id", ["id" => $userId])
                ->where("{$this->getUserPropertiesDefinition()->getName()} = :name", ["name" => $propertyName]);

            if (!empty($value)) {
                $updateable->where("{$this->getUserPropertiesDefinition()->getValue()} = :value", ["value" => $value]);
            }

            $this->propertiesRepository->deleteByQuery($updateable);

            return true;
        }

        return false;
    }
public function removeProperty($userId, $propertyName, $value = null)
    {
        $user = $this->getById($userId);
        if ($user !== null) {

            $updateable = Updatable::getInstance()
                ->table($this->getUserPropertiesDefinition()->table())
                ->where("{$this->getUserPropertiesDefinition()->getUserid()} = :id", ["id" => $userId])
                ->where("{$this->getUserPropertiesDefinition()->getName()} = :name", ["name" => $propertyName]);

            if (!empty($value)) {
                $updateable->where("{$this->getUserPropertiesDefinition()->getValue()} = :value", ["value" => $value]);
            }

            $this->propertiesRepository->deleteByQuery($updateable);

            return true;
        }

        return false;
    }
public function removeProperty ( $ userId , $ propertyName , $ value = null ) { $ user = $ this -> getById ( $ userId ) ; if ( $ user !== null ) { $ updateable = Updatable :: getInstance ( ) -> table ( $ this -> getUserPropertiesDefinition ( ) -> table ( ) ) -> where ( "{$this->getUserPropertiesDefinition()->getUserid()} = :id" , [ "id" => $ userId ] ) -> where ( "{$this->getUserPropertiesDefinition()->getName()} = :name" , [ "name" => $ propertyName ] ) ; if ( ! empty ( $ value ) ) { $ updateable -> where ( "{$this->getUserPropertiesDefinition()->getValue()} = :value" , [ "value" => $ value ] ) ; } $ this -> propertiesRepository -> deleteByQuery ( $ updateable ) ; return true ; } return false ; }
Remove a specific site from user
Return True or false

@param int $userId User Id
@param string $propertyName Property name
@param string $value Property value with a site
@return bool
@throws \ByJG\MicroOrm\Exception\InvalidArgumentException
@throws \ByJG\Serializer\Exception\InvalidArgumentException
Remove a specific site from user Return True or false