07-08-2010 01:07 PM
07-12-2010 05:21 AM
<?php
if (isset($_SERVER[ALF_AVAILABLE]) == false)
{
require_once "Alfresco/Service/Repository.php";
require_once "Alfresco/Service/Session.php";
require_once "Alfresco/Service/SpacesStore.php";
require_once "Alfresco/Service/Node.php";
}
require_once "../config.php";
if (isset($_SESSION) == false)
{
// Start the session
session_start();
}
// Create the session
$repository = new Repository($repositoryUrl);
$ticket = null;
if (isset($_SESSION[ticket]) == false)
{
$ticket = $repository->authenticate($userName, $password);
$_SESSION[ticket] = $ticket;
}
else
{
$ticket = $_SESSION[ticket];
}
$session = $repository->createSession($ticket);
$spacesStore = new SpacesStore($session);
$personNodes = $session->query($spacesStore, 'TYPE:"cm:person" AND @cm:userName:"cboita"');
foreach ($personNodes as $user) {
print "nUser Properties: nn";
$userProps = $user->getProperties();
foreach($userProps as $k => $v) {
print ": $k -> $vnn";
}
print "n User Aspects: nn";
$aspects = $user->getAspects();
foreach ($aspects as $a) {
print ": $ann";
}
}
?>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.