/** * Add a User * @param string $username the username of userObj * @return string The Adobe Conncect id of user found * @return bolean false if any errors occurs */ public function addUser($userObj) { $common_dh = $GLOBALS['common_dh']; $userPwd = substr($common_dh->_get_user_pwd($userObj->getId()), 0, 31); $principalData = array(); $principalData['login'] = $userObj->getUserName(); $principalData['first-name'] = $userObj->getFirstName(); $principalData['last-name'] = $userObj->getLastName(); $principalData['password'] = $userPwd; $principalData['type'] = 'user'; $principalData['send-email'] = false; $principalData['has-children'] = '0'; $principalData['email'] = $userObj->getEmail(); try { $userInfo = $this->apiClient->principalUpdate($principalData); // var_dump($userInfo);die(); $ACUserId = videoroom::xml_attribute($userInfo, 'principal-id'); return $ACUserId; } catch (Exception $ex) { return false; } }