summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 32e8775)
raw | patch | inline | side by side (parent: 32e8775)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 26 Jan 2007 05:42:34 +0000 (05:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 26 Jan 2007 05:42:34 +0000 (05:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5627 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/users/class_userManagement.inc | patch | blob | history |
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index b1c2c1b2b519ec1cef8151cc422d19733a23ea76..55a79bc500c9a75bcbf12b53f282c638fd50186d 100644 (file)
$SortTemp = array();
$List = array();
foreach($ListTemp as $Key => $Entry){
- // Generate caption for rows
- if (isset($Entry["sn"]) && isset($Entry["givenName"])){
- $display= $Entry["sn"][0].", ".$Entry["givenName"][0]." [".$Entry["uid"][0]."]";
- } else {
- $display= "[".$Entry["uid"][0]."]";
- }
- $display = strtolower($display);
- $List[$display] = $Entry;
- $SortTemp[$display] = $display;
+ /* Skip entries that are not located under the people ou (normaly 'ou=people,')
+ * Else winstations will be listed too, if you use the subtree flag.
+ */
+ if(!preg_match("/".normalizePreg(get_people_ou())."/",$Entry['dn'])){
+ continue;
+ }else{
+
+ // Generate caption for rows
+ if (isset($Entry["sn"]) && isset($Entry["givenName"])){
+ $display= $Entry["sn"][0].", ".$Entry["givenName"][0]." [".$Entry["uid"][0]."]";
+ } else {
+ $display= "[".$Entry["uid"][0]."]";
+ }
+
+ $display = strtolower($display);
+ $List[$display] = $Entry;
+ $SortTemp[$display] = $display;
+ }
}
sort($SortTemp);
reset($SortTemp);