當前位置: 首頁>>代碼示例>>PHP>>正文


PHP adLDAP::folder方法代碼示例

本文整理匯總了PHP中adLDAP::folder方法的典型用法代碼示例。如果您正苦於以下問題:PHP adLDAP::folder方法的具體用法?PHP adLDAP::folder怎麽用?PHP adLDAP::folder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在adLDAP的用法示例。


在下文中一共展示了adLDAP::folder方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 /**
  * Delete a user account
  * 
  * @param string $username The username to delete (please be careful here!)
  * @param bool $isGUID Is the username a GUID or a samAccountName
  * @return array
  */
 public function delete($username, $isGUID = false)
 {
     $userinfo = $this->info($username, array("*"), $isGUID);
     $dn = $userinfo[0]['distinguishedname'][0];
     $result = $this->adldap->folder()->delete($dn);
     if ($result != true) {
         return false;
     }
     return true;
 }
開發者ID:wernerflamme,項目名稱:dokuwiki,代碼行數:17,代碼來源:adLDAPUsers.php

示例2: delete

 /**
  * Delete a group account 
  * 
  * @param string $group The group to delete (please be careful here!) 
  * 
  * @return array 
  */
 public function delete($group)
 {
     if (!$this->adldap->getLdapBind()) {
         return false;
     }
     if ($group === null) {
         return "Missing compulsory field [group]";
     }
     $groupInfo = $this->info($group, array("*"));
     $dn = $groupInfo[0]['distinguishedname'][0];
     $result = $this->adldap->folder()->delete($dn);
     if ($result !== true) {
         return false;
     }
     return true;
 }
開發者ID:articatech,項目名稱:artica,代碼行數:23,代碼來源:adLDAPGroups.php

示例3: array

// modify a user account (this example will set "user must change password at next logon")
if (0) {
    $attributes = array("change_password" => 1);
    $result = $adldap->user()->modify("username", $attributes);
    var_dump($result);
}
// change the password of a user. It must meet your domain's password policy
if (0) {
    try {
        $result = $adldap->user()->password("username", "Password123");
        var_dump($result);
    } catch (adLDAPException $e) {
        echo $e;
        exit;
    }
}
// see a user's last logon time
if (0) {
    try {
        $result = $adldap->user()->getLastLogon("username");
        var_dump(date('Y-m-d H:i:s', $result));
    } catch (adLDAPException $e) {
        echo $e;
        exit;
    }
}
// list the contents of the Users OU
if (0) {
    $result = $adldap->folder()->listing(array('Users'), adLDAP::ADLDAP_FOLDER, false);
    var_dump($result);
}
開發者ID:Alenpiera,項目名稱:streeme,代碼行數:31,代碼來源:examples.php


注:本文中的adLDAP::folder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。