Lines Matching +full:update +full:- +full:user +full:- +full:info -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)

12  * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
31 * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
32 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
51 $this->adldap = $adldap;
57 * @param string $username The username of the user to add the Exchange account to
58 * @param array $storageGroup The mailbox, Exchange Storage Group, for the user account, this must be a full CN
60 * @param string $emailAddress The primary email address to add to this user
62 * @param bool $mdbUseDefaults Indicates whether the store should use the default quota, rather than the per-mailbox quota.
75 $baseDn = $this->adldap->getBaseDn();
83 $mdbUseDefaults = $this->adldap->utilities()->boolToString($useDefaults);
91 $result = $this->adldap->user()->modify($username, $attributes, $isGUID);
103 * @param string $username The username of the user to add the X400 to to
119 // Find the dn of the user
120 $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
121 if ($user[0]["dn"] === NULL) { return false; }
122 $userDn = $user[0]["dn"];
127 // Translate the update to the LDAP schema
128 $add = $this->adldap->adldap_schema($attributes);
132 // Do the update
135 $result = @ldap_mod_add($this->adldap->getLdapConnection(), $userDn, $add);
146 * @param string $username The username of the user to add the Exchange account to
147 * @param string $emailAddress The email address to add to this user
162 // Find the dn of the user
163 $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
164 if ($user[0]["dn"] === NULL){ return false; }
165 $userDn = $user[0]["dn"];
168 if (is_array($user[0]["proxyaddresses"]) && $default === true) {
170 for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {
171 if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) {
172 $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]);
174 if ($user[0]['proxyaddresses'][$i] != '') {
175 $modAddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i];
178 $modAddresses['proxyAddresses'][(sizeof($user[0]['proxyaddresses'])-1)] = 'SMTP:' . $emailAddress;
180 $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $modAddresses);
191 // Translate the update to the LDAP schema
192 $add = $this->adldap->adldap_schema($attributes);
198 // Do the update
201 $result = @ldap_mod_add($this->adldap->getLdapConnection(), $userDn,$add);
215 * @param string $username The username of the user to add the Exchange account to
216 * @param string $emailAddress The email address to add to this user
225 // Find the dn of the user
226 $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
227 if ($user[0]["dn"] === NULL) { return false; }
228 $userDn = $user[0]["dn"];
230 if (is_array($user[0]["proxyaddresses"])) {
232 for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {
233 if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false && $user[0]['proxyaddresses'][$i] == 'SMTP:' . $emailAddress) {
236 elseif (strstr($user[0]['proxyaddresses'][$i], 'smtp:') !== false && $user[0]['proxyaddresses'][$i] == 'smtp:' . $emailAddress) {
241 $result = @ldap_mod_del($this->adldap->getLdapConnection(), $userDn,$mod);
255 * @param string $username The username of the user to add the Exchange account to
265 // Find the dn of the user
266 $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
267 if ($user[0]["dn"] === NULL){ return false; }
268 $userDn = $user[0]["dn"];
270 if (is_array($user[0]["proxyaddresses"])) {
272 for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {
273 if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) {
274 $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]);
276 if ($user[0]['proxyaddresses'][$i] == 'smtp:' . $emailAddress) {
277 $user[0]['proxyaddresses'][$i] = str_replace('smtp:', 'SMTP:', $user[0]['proxyaddresses'][$i]);
279 if ($user[0]['proxyaddresses'][$i] != '') {
280 $modAddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i];
284 $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $modAddresses);
309 // Find the dn of the user
310 $user = $this->adldap->contact()->info($distinguishedName, array("cn","displayname"));
311 if ($user[0]["displayname"] === NULL) { return false; }
312 $mailNickname = $user[0]['displayname'][0];
317 // Translate the update to the LDAP schema
318 $mod = $this->adldap->adldap_schema($attributes);
320 // Check to see if this is an enabled status update
323 // Do the update
324 $result = ldap_modify($this->adldap->getLdapConnection(), $distinguishedName, $mod);
338 if (!$this->adldap->getLdapBind()){ return false; }
340 $configurationNamingContext = $this->adldap->getRootDse(array('configurationnamingcontext'));
341 $sr = @ldap_search($this->adldap->getLdapConnection(), $configurationNamingContext[0]['configurationnamingcontext'][0],'(&(objectCategory=msExchExchangeServer))', $attributes);
342 $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
356 if (!$this->adldap->getLdapBind()){ return false; }
358 if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); }
361 $sr = @ldap_search($this->adldap->getLdapConnection(), $exchangeServer, $filter, $attributes);
362 $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
366 $entries[$i]['msexchprivatemdb'] = $this->storageDatabases($entries[$i]['distinguishedname'][0]);
381 if (!$this->adldap->getLdapBind()){ return false; }
385 $sr = @ldap_search($this->adldap->getLdapConnection(), $storageGroup, $filter, $attributes);
386 $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);