@@ -21,6 +21,10 @@ |
||
21 | 21 | /** @var string */ |
22 | 22 | private $email; |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $username |
|
26 | + * @param string $password |
|
27 | + */ |
|
24 | 28 | public function __construct($username, $password, array $roles) |
25 | 29 | { |
26 | 30 | $this->username = $username; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $userString = $this->getUsernameFromString($username); |
79 | 79 | $user = new AdUser( |
80 | 80 | $this->getUsernameFromString($userString), |
81 | - uniqid(true) . rand(0, 424242), |
|
81 | + uniqid(true).rand(0, 424242), |
|
82 | 82 | array() |
83 | 83 | ); |
84 | 84 | } catch (\InvalidArgumentException $e) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | $username = strtolower($username); |
115 | - $pattern = $this->getConfig('username_validation_pattern', '/^[a-z0-9-.]+$/i'); |
|
115 | + $pattern = $this->getConfig('username_validation_pattern', '/^[a-z0-9-.]+$/i'); |
|
116 | 116 | if (preg_match($pattern, $username)) { |
117 | 117 | return $username; |
118 | 118 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $sfRolesTemp = array(); |
189 | 189 | foreach ($groups as $r) { |
190 | 190 | if (in_array($r, $sfRolesTemp) === false) { |
191 | - $sfRoles[] = 'ROLE_' . strtoupper(str_replace(' ', '_', $r)); |
|
191 | + $sfRoles[] = 'ROLE_'.strtoupper(str_replace(' ', '_', $r)); |
|
192 | 192 | $sfRolesTemp[] = $r; |
193 | 193 | } |
194 | 194 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | protected function createAuthProvider(ContainerBuilder $container, $id, $config, $userProviderId) |
31 | 31 | { |
32 | - $providerId = 'security.authentication.provider.riper.active_directory.' . $id; |
|
32 | + $providerId = 'security.authentication.provider.riper.active_directory.'.$id; |
|
33 | 33 | $container |
34 | 34 | ->setDefinition( |
35 | 35 | $providerId, |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function __construct(array $parameters) |
25 | 25 | { |
26 | - $parameters['account_suffix'] = '@' . $parameters['account_suffix']; |
|
26 | + $parameters['account_suffix'] = '@'.$parameters['account_suffix']; |
|
27 | 27 | $this->parameters = $parameters; |
28 | 28 | } |
29 | 29 |