Changeset 6148 for sandbox/webservice/api/library
- Timestamp:
- 05/08/12 18:37:32 (12 years ago)
- Location:
- sandbox/webservice/api/library
- Files:
-
- 1 deleted
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/library/Expresso.php
r6146 r6148 2 2 class Expresso extends Resource { 3 3 4 protected $expressoVersion; 5 protected $ldapCatalog; 4 private $expressoVersion; 6 5 private $request; 7 6 private $params; … … 29 28 public function getRequest(){ 30 29 return $this->request; 30 } 31 32 protected function getExpressoVersion(){ 33 return $this->expressoVersion; 31 34 } 32 35 … … 104 107 return $response; 105 108 } 106 107 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 117 return array(118 'contactID' => $GLOBALS['phpgw_info']['user']['account_dn'],119 'contactMails' => array($GLOBALS['phpgw_info']['user']['email']),120 'contactPhones' => array($GLOBALS['phpgw_info']['user']['telephonenumber']),121 'contactFullName' => $GLOBALS['phpgw_info']['user']['fullname'],122 'contactApps' => $contactApps123 );124 }125 protected function getLdapCatalog(){126 if(!$this->ldapCatalog) {127 $catalog_config = CreateObject("contactcenter.bo_ldap_manager");128 $_SESSION['phpgw_info']['expressomail']['ldap_server'] = $catalog_config ? $catalog_config->srcs[1] : null;129 $this->ldapCatalog = CreateObject("expressoMail1_2.ldap_functions");130 }131 132 return $this->ldapCatalog;133 }134 135 protected function getDb(){136 return $GLOBALS['phpgw']->db;137 }138 109 139 110 protected function isLoggedIn(){
Note: See TracChangeset
for help on using the changeset viewer.