当前位置: 首页>>代码示例>>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;未经允许,请勿转载。