@@ -551,8 +551,6 @@ |
||
551 | 551 | |
552 | 552 | /** |
553 | 553 | * Send LDAP pagination control. |
554 | - * @param int $pageSize |
|
555 | - * @param bool $isCritical |
|
556 | 554 | * @param string $cookie |
557 | 555 | * @return bool |
558 | 556 | */ |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | # Create AD password (Microsoft Active Directory password format) |
141 | 141 | protected static function makeAdPassword($password) { |
142 | - $password = "\"" . $password . "\""; |
|
142 | + $password = "\"".$password."\""; |
|
143 | 143 | $adpassword = mb_convert_encoding($password, "UTF-16LE", "UTF-8"); |
144 | 144 | return $adpassword; |
145 | 145 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function open($anonymous = false) |
190 | 190 | { |
191 | - $token = 'Opening LDAP connection: ' . LdapUtils::recursive_implode($this->dc, ' or '); |
|
191 | + $token = 'Opening LDAP connection: '.LdapUtils::recursive_implode($this->dc, ' or '); |
|
192 | 192 | Yii::info($token, __METHOD__); |
193 | 193 | Yii::beginProfile($token, __METHOD__); |
194 | 194 | // Connect to the LDAP server. |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | # Search for user and get user DN |
246 | 246 | $searchResult = ldap_search($this->resource, $this->baseDn, "(&(objectClass=person)($this->loginAttribute=$username))", [$this->loginAttribute]); |
247 | 247 | $entry = $this->getFirstEntry($searchResult); |
248 | - if($entry) { |
|
248 | + if ($entry) { |
|
249 | 249 | $this->userDn = $this->getDn($entry); |
250 | 250 | } else { |
251 | 251 | // User not found. |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } |
276 | 276 | |
277 | 277 | // Open connection with user |
278 | - if(!$this->auth($username, $oldPassword)){ |
|
278 | + if (!$this->auth($username, $oldPassword)) { |
|
279 | 279 | return false; |
280 | 280 | } |
281 | 281 | |
@@ -314,20 +314,20 @@ discard block |
||
314 | 314 | $this->open(); |
315 | 315 | $results = []; |
316 | 316 | $cookie = ''; |
317 | - $token = $function . ' - params: ' . LdapUtils::recursive_implode($params, ';'); |
|
317 | + $token = $function.' - params: '.LdapUtils::recursive_implode($params, ';'); |
|
318 | 318 | |
319 | - Yii::info($token , 'chrmorandi\ldap\Connection::query'); |
|
319 | + Yii::info($token, 'chrmorandi\ldap\Connection::query'); |
|
320 | 320 | |
321 | 321 | Yii::beginProfile($token, 'chrmorandi\ldap\Connection::query'); |
322 | 322 | do { |
323 | - if($this->pageSize > 0) { |
|
323 | + if ($this->pageSize > 0) { |
|
324 | 324 | $this->setControlPagedResult($cookie); |
325 | 325 | } |
326 | 326 | |
327 | 327 | // Run the search. |
328 | 328 | $result = call_user_func($function, $this->resource, ...$params); |
329 | 329 | |
330 | - if($this->pageSize > 0) { |
|
330 | + if ($this->pageSize > 0) { |
|
331 | 331 | $this->setControlPagedResultResponse($result, $cookie); |
332 | 332 | } |
333 | 333 |