Skip to content

Commit 7297953

Browse files
committed
Merge branch 'develop' of https://github.com/aalaily/snipe-it into aalaily-develop
# Conflicts: # app/controllers/admin/UsersController.php
2 parents ee46b22 + 23bde13 commit 7297953

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

app/config/production/ldap.example.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
'result.last.name' => "",
7676
'result.first.name' => "",
7777
'result.email' => "",
78+
79+
/*
80+
| This field is optional as not all LDAP directories will have it. If yours
81+
| does not have it, just leave this field blank and the extra check will
82+
| be omitted.
83+
*/
7884
'result.active.flag' => "",
7985

8086
/*

app/config/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
return array (
33
'app_version' => 'v2.0-pre',
4-
'hash_version' => 'v2.0-pre-beta-383-g80fb7a4',
4+
'hash_version' => 'v2.0-pre-beta-384-ge7d7cc6',
55
);

app/controllers/admin/UsersController.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ public function getLDAP() {
10681068
/**
10691069
* LDAP form processing.
10701070
*
1071-
* @Auther Aladin Alaily
1071+
* @author Aldin Alaily
10721072
* @return Redirect
10731073
*/
10741074
public function postLDAP() {
@@ -1119,7 +1119,7 @@ public function postLDAP() {
11191119

11201120
$summary = array();
11211121
for ($i = 0; $i < $results["count"]; $i++) {
1122-
if ($results[$i][$ldap_result_active_flag][0] == "TRUE") {
1122+
if (empty($ldap_result_active_flag) || $results[$i][$ldap_result_active_flag][0] == "TRUE") {
11231123

11241124
$item = array();
11251125
$item["username"] = isset( $results[$i][$ldap_result_username][0] ) ? $results[$i][$ldap_result_username][0] : "";
@@ -1173,11 +1173,7 @@ public function postLDAP() {
11731173

11741174
array_push($summary, $item);
11751175
}
1176-
/* Easy break in the loop */
1177-
/*
1178-
if ($i >= 1)
1179-
break;
1180-
*/
1176+
11811177
}
11821178

11831179

0 commit comments

Comments
 (0)