@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $this->attributes = $attributes; |
| 56 | 56 | $this->roles = $roles; |
| 57 | 57 | $this->memberships = $memberships; |
| 58 | - $this->ownerships = array_map(function($group) { |
|
| 58 | + $this->ownerships = array_map(function ($group) { |
|
| 59 | 59 | return $group['ou'][0]; |
| 60 | 60 | }, $ownerships); |
| 61 | 61 | } |
@@ -352,17 +352,17 @@ |
||
| 352 | 352 | */ |
| 353 | 353 | public function createGuest($name, $mail) |
| 354 | 354 | { |
| 355 | - $username = 'guest'.$this->generateUsername($name); |
|
| 355 | + $username = 'guest' . $this->generateUsername($name); |
|
| 356 | 356 | $dn = sprintf('uid=%s,ou=guests,ou=people,o=sog-de,dc=sog', $username); |
| 357 | 357 | $info = []; |
| 358 | 358 | |
| 359 | 359 | // core data |
| 360 | 360 | Attribute::setAttribute($info, 'dn', $dn); |
| 361 | 361 | Attribute::setAttribute($info, 'uid', $username); |
| 362 | - Attribute::setAttribute($info, 'cn', "Guest ".$name); |
|
| 363 | - Attribute::setAttribute($info, 'displayName', "Guest ".$name); |
|
| 364 | - Attribute::setAttribute($info, 'sn', "Guest ".$name); |
|
| 365 | - Attribute::setAttribute($info, 'cn', "Guest ".$name); |
|
| 362 | + Attribute::setAttribute($info, 'cn', "Guest " . $name); |
|
| 363 | + Attribute::setAttribute($info, 'displayName', "Guest " . $name); |
|
| 364 | + Attribute::setAttribute($info, 'sn', "Guest " . $name); |
|
| 365 | + Attribute::setAttribute($info, 'cn', "Guest " . $name); |
|
| 366 | 366 | |
| 367 | 367 | // meta data |
| 368 | 368 | Attribute::setAttribute($info, 'mail', $mail); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $roles = $this->getRoles($dn, $ownerships); |
| 55 | 55 | return new LdapUser($username, null, $attributes, $roles, $memberships, $ownerships); |
| 56 | 56 | } catch (LdapException $ex) { |
| 57 | - throw new UsernameNotFoundException($ex->getMessage().'Der Login war nicht erfolgreich, bitte überprüfe deinen Benutzernamen und Passwort.'); |
|
| 57 | + throw new UsernameNotFoundException($ex->getMessage() . 'Der Login war nicht erfolgreich, bitte überprüfe deinen Benutzernamen und Passwort.'); |
|
| 58 | 58 | $logger = $this->get('logger'); |
| 59 | 59 | $logger->error(($ex->getMessage())); |
| 60 | 60 | } |