function qa_get_users_html($userids, $should_include_link, $relative_url_prefix)
{
    $users = QACASHandler::getUsers($userids);
    $result = array();
    foreach ($users as $userid => $data) {
        $publicusername = $data['publicusername'];
        $displayname = isset($data['display']) ? $data['display'] : $publicusername;
        $result[$userid] = htmlspecialchars($displayname);
        if ($should_include_link) {
            $result[$userid] = '<a href="' . qa_path_html('user/' . $publicusername) . '" class="qa-user-link">' . $result[$userid] . '</a>';
        }
    }
    return $result;
}
Exemple #2
0
<?php

define('QA_VERSION', 1);
require_once dirname(__FILE__) . '/handler.php';
try {
    QACASHandler::logout();
} catch (Exception $e) {
    echo $e;
}
Exemple #3
0
<?php

define('QA_VERSION', 1);
require_once dirname(__FILE__) . '/handler.php';
try {
    QACASHandler::login();
} catch (Exception $e) {
    echo $e;
}
 protected static function initLdap()
 {
     if (self::$ldap == NULL) {
         self::$ldap = new QACASLDAP();
     }
 }