public function modifyProperty($user, $newValue, $property = self::LOGIN_PROPERTY)
    {
        $this->checkProperty($property, true);

        $propertyObject = $this->properties[$property];
        if (is_string($propertyObject)) {
            $this->properties[$property] = $propertyObject = new ReflectionProperty($user, $propertyObject);
        }

        $propertyObject->setAccessible(true);
        $propertyObject->setValue($user, $newValue);

        $oid = spl_object_hash($user);
        if (!array_key_exists($oid, $this->lazyValueCache)) {
            $this->lazyValueCache[$oid] = array();
        }

        $this->lazyValueCache[$oid][$property] = $newValue;
    }
public function modifyProperty($user, $newValue, $property = self::LOGIN_PROPERTY)
    {
        $this->checkProperty($property, true);

        $propertyObject = $this->properties[$property];
        if (is_string($propertyObject)) {
            $this->properties[$property] = $propertyObject = new ReflectionProperty($user, $propertyObject);
        }

        $propertyObject->setAccessible(true);
        $propertyObject->setValue($user, $newValue);

        $oid = spl_object_hash($user);
        if (!array_key_exists($oid, $this->lazyValueCache)) {
            $this->lazyValueCache[$oid] = array();
        }

        $this->lazyValueCache[$oid][$property] = $newValue;
    }
public function modifyProperty ( $ user , $ newValue , $ property = self :: LOGIN_PROPERTY ) { $ this -> checkProperty ( $ property , true ) ; $ propertyObject = $ this -> properties [ $ property ] ; if ( is_string ( $ propertyObject ) ) { $ this -> properties [ $ property ] = $ propertyObject = new ReflectionProperty ( $ user , $ propertyObject ) ; } $ propertyObject -> setAccessible ( true ) ; $ propertyObject -> setValue ( $ user , $ newValue ) ; $ oid = spl_object_hash ( $ user ) ; if ( ! array_key_exists ( $ oid , $ this -> lazyValueCache ) ) { $ this -> lazyValueCache [ $ oid ] = array ( ) ; } $ this -> lazyValueCache [ $ oid ] [ $ property ] = $ newValue ; }
Modifies a property and clears the cache.

@param object $user
@param mixed  $newValue
@param string $property
Modifies a property and clears the cache .