本文整理汇总了PHP中clladp::Hash_all_mailboxesActives方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::Hash_all_mailboxesActives方法的具体用法?PHP clladp::Hash_all_mailboxesActives怎么用?PHP clladp::Hash_all_mailboxesActives使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clladp
的用法示例。
在下文中一共展示了clladp::Hash_all_mailboxesActives方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ExportUsers
function ExportUsers($ou, $server, $port, $admin, $password)
{
$sql = "DELETE FROM exports WHERE `function`='" . __FUNCTION__ . '"';
$q = new mysql();
$q->QUERY_SQL($sql, 'artica_events');
$AuThMeth = "?AuThMeth=" . base64_encode(serialize(array("admin" => $admin, "pass" => $password)));
$ldap = new clladp();
$users = $ldap->Hash_all_mailboxesActives($ou);
$CountDeUsers = count($users);
events("[{$admin}@{$server}:{$port}]: Exporting {$CountDeUsers} active member(s) inside {$ou}", null, __FUNCTION__, __LINE__);
while (list($uid, $password) = each($users)) {
$user = new user($uid);
foreach ($user as $key => $value) {
if ($key == "uidNumber") {
continue;
}
if ($key == "local_sid") {
continue;
}
if ($key == "accountGroup") {
continue;
}
if ($key == "group_id") {
continue;
}
$array[$uid][$key] = $value;
}
}
events("[{$admin}@{$server}:{$port}]: Exporting array of " . count($array) . " items", null, __FUNCTION__, __LINE__);
$curl = new ccurl("https://{$server}:{$port}/import.users.listener.php{$AuThMeth}", true);
$curl->parms["MEMBERS"] = base64_encode(serialize($array));
$curl->parms["OU"] = $ou;
if (!$curl->get()) {
events("[{$admin}@{$server}:{$port}]: Exporting {$CountDeUsers} active member(s) inside {$ou}", $curl->error, __FUNCTION__, __LINE__);
return false;
}
if (preg_match("#<ERROR>(.+?)</ERROR>#is", $curl->data, $re)) {
events("[{$admin}@{$server}:{$port}]: Exporting {$CountDeou} organizations failed", $re[1], __FUNCTION__, __LINE__);
return false;
}
if (preg_match("#<SUCCESS>(.+?)</SUCCESS>#is", $curl->data, $re)) {
events("[{$admin}@{$server}:{$port}]: Success Exporting {$CountDeou} organizations", $re[1], __FUNCTION__, __LINE__);
return false;
}
}