@@ -197,7 +197,7 @@ |
||
| 197 | 197 | // Open connection with manager |
| 198 | 198 | $this->open(); |
| 199 | 199 | |
| 200 | - # Search for user and get user DN |
|
| 200 | + # Search for user and get user DN |
|
| 201 | 201 | $searchResult = ldap_search($this->resource, $this->baseDn, "(&(objectClass=person)($this->loginAttribute=$username))", [$this->loginAttribute]); |
| 202 | 202 | $entry = $this->getFirstEntry($searchResult); |
| 203 | 203 | if($entry) { |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | # Create AD password (Microsoft Active Directory password format) |
| 138 | 138 | protected static function makeAdPassword($password) { |
| 139 | - $password = "\"" . $password . "\""; |
|
| 139 | + $password = "\"".$password."\""; |
|
| 140 | 140 | $adpassword = mb_convert_encoding($password, "UTF-16LE", "UTF-8"); |
| 141 | 141 | return $adpassword; |
| 142 | 142 | } |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | # Search for user and get user DN |
| 201 | 201 | $searchResult = ldap_search($this->resource, $this->baseDn, "(&(objectClass=person)($this->loginAttribute=$username))", [$this->loginAttribute]); |
| 202 | 202 | $entry = $this->getFirstEntry($searchResult); |
| 203 | - if($entry) { |
|
| 203 | + if ($entry) { |
|
| 204 | 204 | $this->userDn = $this->getDn($entry); |
| 205 | 205 | } else { |
| 206 | 206 | $this->userDn = null; |
@@ -232,12 +232,12 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | $modifications = [ |
| 235 | - [ // Create batch modification for removing the old password. |
|
| 235 | + [// Create batch modification for removing the old password. |
|
| 236 | 236 | "attrib" => $this->unicodePassword, |
| 237 | 237 | "modtype" => LDAP_MODIFY_BATCH_REMOVE, |
| 238 | 238 | "values" => [self::encodePassword($oldPassword)], |
| 239 | 239 | ], |
| 240 | - [ // Create batch modification for adding the new password. |
|
| 240 | + [// Create batch modification for adding the new password. |
|
| 241 | 241 | "attrib" => $this->unicodePassword, |
| 242 | 242 | "modtype" => LDAP_MODIFY_BATCH_ADD, |
| 243 | 243 | "values" => [self::encodePassword($oldPassword)], |
@@ -284,8 +284,8 @@ discard block |
||
| 284 | 284 | $results[] = $result; |
| 285 | 285 | } while ($cookie !== null && $cookie != ''); |
| 286 | 286 | |
| 287 | - if($this->offset > 0){ |
|
| 288 | - $results = $results[intval($this->offset/$this->pageSize -1)]; |
|
| 287 | + if ($this->offset > 0) { |
|
| 288 | + $results = $results[intval($this->offset / $this->pageSize - 1)]; |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | return new DataReader($this, $results); |