Ignore:
Timestamp:
05/04/12 18:36:05 (12 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Alterado contactID para user DN.Adicionado array de aplicações.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/rest/core/Expresso.php

    r6061 r6110  
    106106                 
    107107        protected function getUserProfile(){ 
     108                $user_id = $GLOBALS['phpgw_info']['user']['account_id']['acl'];          
     109                $acl = CreateObject('phpgwapi.acl'); 
     110                $apps = $acl->get_user_applications($user_id); 
     111                $contactApps = array(); 
     112                foreach($apps as $app => $isEnabled){ 
     113                        if($isEnabled) 
     114                                $contactApps[] = $app; 
     115                } 
     116 
    108117                return array( 
    109                         'contactID'                     => $GLOBALS['phpgw_info']['user']['account_id'], 
     118                        'contactID'                     => $GLOBALS['phpgw_info']['user']['account_dn'], 
    110119                        'contactMails'          => array($GLOBALS['phpgw_info']['user']['email']), 
    111120                        'contactPhones'         => array($GLOBALS['phpgw_info']['user']['telephonenumber']), 
    112                         'contactFullName'       => $GLOBALS['phpgw_info']['user']['fullname'] 
     121                        'contactFullName'       => $GLOBALS['phpgw_info']['user']['fullname'], 
     122                        'contactApps'           => $contactApps 
    113123                ); 
    114124        } 
Note: See TracChangeset for help on using the changeset viewer.