userlink\n"; echo "\n"; echo "\n"; StatusMessage("ERROR", "", _("This user was not found!") . " (" . $user . ")"); echo "

 

"; echo "

" . _("Back to group list") . "

"; echo ("\n"); } /** * Searches LDAP for a specific user name (uid attribute) and returns its DN entry * * @param string $name user name * @return string DN */ function search_username($name) { $filter = "(uid=$name)"; $attrs = array(); $sr = @ldap_search($_SESSION['ldap']->server(), escapeDN($_SESSION['config']->get_Suffix('user')), $filter, $attrs, 0, 0, 0, LDAP_DEREF_NEVER); if ($sr) { $info = ldap_get_entries($_SESSION['ldap']->server(), $sr); // return only first DN entry $ret = $info[0]["dn"]; ldap_free_result($sr); return $ret; } else return ""; } ?>