source: sandbox/2.4.1-3/prototype/me.php @ 6357

Revision 6357, 763 bytes checked in by gustavo, 12 years ago (diff)

Ticket #2768 - Melhorias na inserção de destinatários na criacao de mensagem

Line 
1<?php
2
3require_once  (dirname(__FILE__).'/api/controller.php');
4use prototype\api\Config as Config;
5
6$me = Controller::read(array('concept' => 'user', 'service' => 'OpenLDAP'  , 'id' => Config::me('uidNumber')));
7$me['token'] = $_SESSION['oauth']['access_token'];
8
9echo json_encode( $me );
10
11// if( !$me )
12//     return;
13//
14// $links = Controller::links();
15//
16// $return = array();
17//
18// foreach( $links as $concept => $link )
19// {
20//     $concepts = array();
21//
22//     foreach( $link as $linkName => $linkTarget )
23//       if( Controller::isConcept( $linkName ) )
24//          $concepts[ $linkName ] = true;
25//
26//      $return[ $concept ] = array( 'concepts' => $concepts, 'links' => $link );
27// }
28//
29// echo json_encode( array( 'me' => $me, 'links' => $return ) );
Note: See TracBrowser for help on using the repository browser.