As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
$nodeId = "//PUT HERE UR NODEID"; $repositoryUrl = "http://localhost:8080/alfresco/api"; $userName = "admin"; $password = "admin"; $repository = new Repository($repositoryUrl); $ticket = $repository->authenticate($userName, $password); $session = $repository->createSession($ticket); $spacesStore = new SpacesStore($session); //$result = $session->query($spacesStore, "PUT HERE YOUR LUCENE QUERY"); // FOR EXAMPLE -> QUERY OF Gyro.Gearless: $result = $session->query($spacesStore, "TYPE:\"cm:person\" AND @cm\:name:\"Jones\"");
If you will use php to retrive for user information , you will use MYsql data.
<?php define('sugarEntry', TRUE); $apiRoot = dirname(__FILE__) . '/../src'; set_include_path($apiRoot . PATH_SEPARATOR . get_include_path()); print "Include path set to [" . get_include_path() . "}\n"; require_once "Alfresco/Service/Repository.php"; require_once "Alfresco/Service/Session.php"; require_once "Alfresco/Service/SpacesStore.php"; require_once "config.php"; $timestamp = time(); $repository = new AlfRepository($repositoryUrl); $ticket = $repository->authenticate($userName, $password); print "Alfresco ticket is $ticket\n"; $session = $repository->createSession($ticket); $spacesStore = new AlfSpacesStore($session); $personNodes = $session->query($spacesStore, 'TYPE:"cm:person" AND @cm\\:userName:"wolland"'); foreach ($personNodes as $gyro) { print "– Properties ————–\n"; $gyroProps = $gyro->getProperties(); foreach($gyroProps as $k => $v) { print ": $k -> $v\n"; } print "– Aspects —————–\n"; $aspects = $gyro->getAspects(); foreach ($aspects as $a) { print ": $a\n"; } } ?>
<?php $repositoryUrl = "http://conman1.acmecorp.net:8080/alfresco/api"; $userName = "admin"; $password = "töp$€(re7"; ?>
Or you can also have a Look in the Post:http://forums.alfresco.com/en/viewtopic.php?f=21&t=9390