@@ -34,8 +34,7 @@ |
||
| 34 | 34 | $args['RawMessage'] = array(); |
| 35 | 35 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
| 36 | 36 | return $this->ses->sendRawEmail($args); |
| 37 | - } |
|
| 38 | - else |
|
| 37 | + } else |
|
| 39 | 38 | { |
| 40 | 39 | $args = array(); |
| 41 | 40 | $args['Source'] = $email->getFromAddress(); |
@@ -21,14 +21,12 @@ discard block |
||
| 21 | 21 | throw new \Exception('No such LDAP User!'); |
| 22 | 22 | } |
| 23 | 23 | $this->ldapObj = $users[0]; |
| 24 | - } |
|
| 25 | - else |
|
| 24 | + } else |
|
| 26 | 25 | { |
| 27 | 26 | if(isset($data['extended'])) |
| 28 | 27 | { |
| 29 | 28 | $this->ldapObj = $data['extended']; |
| 30 | - } |
|
| 31 | - else |
|
| 29 | + } else |
|
| 32 | 30 | { |
| 33 | 31 | $this->ldapObj = $data; |
| 34 | 32 | } |
@@ -44,7 +42,9 @@ discard block |
||
| 44 | 42 | { |
| 45 | 43 | $dn = explode(',', $array[$i]); |
| 46 | 44 | $res = $this->isInGroupNamed(substr($dn[0], 3)); |
| 47 | - if($res) return $res; |
|
| 45 | + if($res) { |
|
| 46 | + return $res; |
|
| 47 | + } |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | return $res; |
@@ -206,8 +206,7 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | return $res; |
| 209 | - } |
|
| 210 | - else |
|
| 209 | + } else |
|
| 211 | 210 | { |
| 212 | 211 | return false; |
| 213 | 212 | } |
@@ -231,8 +230,7 @@ discard block |
||
| 231 | 230 | if(!is_object($this->ldapObj)) |
| 232 | 231 | { |
| 233 | 232 | return $this->setFieldLocal('userPassword', $this->generateLDAPPass($password)); |
| 234 | - } |
|
| 235 | - else |
|
| 233 | + } else |
|
| 236 | 234 | { |
| 237 | 235 | $obj = array('dn'=>$this->ldapObj->dn); |
| 238 | 236 | $obj['userPassword'] = $this->generateLDAPPass($password); |
@@ -321,8 +319,7 @@ discard block |
||
| 321 | 319 | if(!is_object($this->ldapObj)) |
| 322 | 320 | { |
| 323 | 321 | return $this->setFieldLocal('uid', $uid); |
| 324 | - } |
|
| 325 | - else |
|
| 322 | + } else |
|
| 326 | 323 | { |
| 327 | 324 | throw new \Exception('Unsupported!'); |
| 328 | 325 | } |
@@ -416,8 +413,7 @@ discard block |
||
| 416 | 413 | if(isset($ldapObj->userpassword)) |
| 417 | 414 | { |
| 418 | 415 | $hash = hash('sha512', $ldapObj->dn.';'.$ldapObj->userpassword[0].';'.$ldapObj->mail[0]); |
| 419 | - } |
|
| 420 | - else |
|
| 416 | + } else |
|
| 421 | 417 | { |
| 422 | 418 | $hash = hash('sha512', $ldapObj->dn.';'.openssl_random_pseudo_bytes(10).';'.$ldapObj->mail[0]); |
| 423 | 419 | } |
@@ -11,8 +11,7 @@ discard block |
||
| 11 | 11 | if($collection_name !== false) |
| 12 | 12 | { |
| 13 | 13 | $this->namespace = $collection.'.'.$collection_name; |
| 14 | - } |
|
| 15 | - else |
|
| 14 | + } else |
|
| 16 | 15 | { |
| 17 | 16 | $this->collection = $collection; |
| 18 | 17 | } |
@@ -26,8 +25,7 @@ discard block |
||
| 26 | 25 | if($filter instanceof \Data\Filter) |
| 27 | 26 | { |
| 28 | 27 | $criteria = $filter->to_mongo_filter(); |
| 29 | - } |
|
| 30 | - else |
|
| 28 | + } else |
|
| 31 | 29 | { |
| 32 | 30 | $criteria = $filter; |
| 33 | 31 | } |