@@ -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; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | |
231 | 231 | // Open connection with user |
232 | - if(!$this->auth($username, $oldPassword)){ |
|
232 | + if (!$this->auth($username, $oldPassword)) { |
|
233 | 233 | return false; |
234 | 234 | } |
235 | 235 | |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | $results[] = $result; |
279 | 279 | } while ($cookie !== null && $cookie != ''); |
280 | 280 | |
281 | - if($this->offset > 0){ |
|
282 | - $results = $results[intval($this->offset/$this->pageSize -1)]; |
|
281 | + if ($this->offset > 0) { |
|
282 | + $results = $results[intval($this->offset / $this->pageSize - 1)]; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | return new DataReader($this, $results); |