public function isPasswordValid($password,  core_kernel_classes_Resource $user)
    {
        $returnValue = (bool) false;

        if(!is_string($password)){
			throw new core_kernel_users_Exception('The password must be of "string" type, got '.gettype($password));
		}
		
		$hash = $user->getUniquePropertyValue(new core_kernel_classes_Property(GenerisRdf::PROPERTY_USER_PASSWORD));
		$returnValue = core_kernel_users_Service::getPasswordHash()->verify($password, $hash);

        return (bool) $returnValue;
    }