@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param $options ModuleOptions |
29 | 29 | * @param $config array |
30 | 30 | */ |
31 | - public function __construct($options,$config) |
|
31 | + public function __construct($options, $config) |
|
32 | 32 | { |
33 | 33 | $this->options = $options; |
34 | 34 | $this->config = $config; |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function __invoke() |
44 | 44 | { |
45 | - $SocialNetworksEnabled=[]; |
|
46 | - foreach($this->config['hybridauth'] as $key => $val) { |
|
47 | - if ($val['enabled'] and in_array(strtolower($key), $this->options->getEnableLogins())){ |
|
45 | + $SocialNetworksEnabled = []; |
|
46 | + foreach ($this->config['hybridauth'] as $key => $val) { |
|
47 | + if ($val['enabled'] and in_array(strtolower($key), $this->options->getEnableLogins())) { |
|
48 | 48 | $SocialNetworksEnabled[strtolower($key)] = $key; |
49 | 49 | } |
50 | 50 | } |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | class IndexController extends AbstractActionController |
28 | 28 | { |
29 | 29 | |
30 | - const LOGIN='login'; |
|
31 | - const REGISTER='register'; |
|
30 | + const LOGIN = 'login'; |
|
31 | + const REGISTER = 'register'; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @var AuthenticationService |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @param $forms |
57 | 57 | * @param $options ModuleOptions |
58 | 58 | */ |
59 | - public function __construct(AuthenticationService $auth, LoggerInterface $logger,array $forms, $options) |
|
59 | + public function __construct(AuthenticationService $auth, LoggerInterface $logger, array $forms, $options) |
|
60 | 60 | { |
61 | 61 | $this->auth = $auth; |
62 | 62 | $this->forms = $forms; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $registerForm = $this->forms[self::REGISTER]; |
85 | 85 | |
86 | 86 | /* @var $request \Zend\Http\Request */ |
87 | - $request = $this->getRequest(); |
|
87 | + $request = $this->getRequest(); |
|
88 | 88 | |
89 | 89 | if ($request->isPost()) { |
90 | 90 | $data = $this->params()->fromPost(); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $headers = $request->getHeaders(); |
119 | 119 | if ($headers->has('Accept-Language')) { |
120 | 120 | $locales = $headers->get('Accept-Language')->getPrioritized(); |
121 | - $language = $locales[0]->type; |
|
121 | + $language = $locales[0]->type; |
|
122 | 122 | } else { |
123 | 123 | $language = 'en'; |
124 | 124 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | if (!empty($loginSuffix)) { |
144 | 144 | $loginName = $loginName . ' (' . $loginName . $loginSuffix . ')'; |
145 | 145 | } |
146 | - $this->logger->info('Failed to authenticate User ' . $loginName ); |
|
146 | + $this->logger->info('Failed to authenticate User ' . $loginName); |
|
147 | 147 | $this->notification()->danger(/*@translate*/ 'Authentication failed.'); |
148 | 148 | } |
149 | 149 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | */ |
191 | 191 | public function loginAction() |
192 | 192 | { |
193 | - $ref = urldecode($this->getRequest()->getBasePath().$this->params()->fromQuery('ref')); |
|
193 | + $ref = urldecode($this->getRequest()->getBasePath() . $this->params()->fromQuery('ref')); |
|
194 | 194 | $provider = $this->params('provider', '--keiner--'); |
195 | 195 | $hauth = $this->getServiceLocator()->get('HybridAuthAdapter'); |
196 | 196 | $hauth->setProvider($provider); |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | $user = $auth->getUser(); |
204 | 204 | $password = substr(md5(uniqid()), 0, 6); |
205 | 205 | $login = uniqid() . ($this->options->auth_suffix != "" ? '@' . $this->options->auth_suffix : ''); |
206 | - $externalLogin = isset($user->login)?$user->login:'-- not communicated --'; |
|
206 | + $externalLogin = isset($user->login) ? $user->login : '-- not communicated --'; |
|
207 | 207 | $this->logger->debug('first login via ' . $provider . ' as: ' . $externalLogin); |
208 | 208 | |
209 | - $user->login=$login; |
|
209 | + $user->login = $login; |
|
210 | 210 | $user->setPassword($password); |
211 | 211 | $user->role = $this->options->getRole(); |
212 | 212 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $settings = $user->getSettings('Core'); |
243 | 243 | if (null !== $settings->localization->language) { |
244 | 244 | $basePath = $this->getRequest()->getBasePath(); |
245 | - $ref = preg_replace('~^'.$basePath . '/[a-z]{2}(/)?~', $basePath . '/' . $settings->localization->language . '$1', $ref); |
|
245 | + $ref = preg_replace('~^' . $basePath . '/[a-z]{2}(/)?~', $basePath . '/' . $settings->localization->language . '$1', $ref); |
|
246 | 246 | } |
247 | 247 | return $this->redirect()->toUrl($ref); |
248 | 248 | } |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | if (array_key_exists('firstLogin', $resultMessage) && $resultMessage['firstLogin'] === true) { |
307 | 307 | // first external Login |
308 | 308 | $userName = $this->params()->fromPost('user'); |
309 | - $this->logger->debug('first login for User: ' . $userName); |
|
309 | + $this->logger->debug('first login for User: ' . $userName); |
|
310 | 310 | // |
311 | 311 | if (preg_match("/^(.*)@\w+$/", $userName, $realUserName)) { |
312 | 312 | $userName = $realUserName[1]; |
@@ -371,9 +371,9 @@ discard block |
||
371 | 371 | $params = new Parameters( |
372 | 372 | array( |
373 | 373 | 'format' => 'json', |
374 | - 'group' => array ( |
|
375 | - 0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3', 5 => 'flatscreen4', |
|
376 | - 6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7', 9 => 'flatscreen8', 10 => 'flatscreen9' |
|
374 | + 'group' => array( |
|
375 | + 0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3', 5 => 'flatscreen4', |
|
376 | + 6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7', 9 => 'flatscreen8', 10 => 'flatscreen9' |
|
377 | 377 | ), |
378 | 378 | 'name' => '(die) Rauscher – Unternehmensberatung & Consulting', |
379 | 379 | ) |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | public function logoutAction() |
436 | 436 | { |
437 | 437 | $auth = $this->auth; |
438 | - $this->logger->info('User ' . ($auth->getUser()->login==''?$auth->getUser()->info->displayName:$auth->getUser()->login) . ' logged out'); |
|
438 | + $this->logger->info('User ' . ($auth->getUser()->login == '' ? $auth->getUser()->info->displayName : $auth->getUser()->login) . ' logged out'); |
|
439 | 439 | $auth->clearIdentity(); |
440 | 440 | unset($_SESSION['HA::STORE']); |
441 | 441 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function indexAction() |
51 | 51 | { |
52 | - if (!$this->options->getEnableRegistration()){ |
|
52 | + if (!$this->options->getEnableRegistration()) { |
|
53 | 53 | $this->notification()->info( /*@translate*/ 'Registration is disabled'); |
54 | 54 | return $this->redirect()->toRoute('lang'); |
55 | 55 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $this->form->setAttribute('action', $this->url()->fromRoute('lang/register')); |
97 | 97 | |
98 | - $viewModel->setVariable('form' , $this->form ); |
|
98 | + $viewModel->setVariable('form', $this->form); |
|
99 | 99 | |
100 | 100 | return $viewModel; |
101 | 101 | } |
@@ -61,8 +61,8 @@ |
||
61 | 61 | |
62 | 62 | $this->add($fieldset); |
63 | 63 | |
64 | - $mode=$options->getMode(); |
|
65 | - if (in_array($mode, [CaptchaOptions::RE_CAPTCHA,CaptchaOptions::IMAGE])) { |
|
64 | + $mode = $options->getMode(); |
|
65 | + if (in_array($mode, [CaptchaOptions::RE_CAPTCHA, CaptchaOptions::IMAGE])) { |
|
66 | 66 | if ($mode == CaptchaOptions::IMAGE) { |
67 | 67 | $captcha = new Image($options->getImage()); |
68 | 68 | } elseif ($mode == CaptchaOptions::RE_CAPTCHA) { |
@@ -40,9 +40,9 @@ |
||
40 | 40 | * @var array |
41 | 41 | */ |
42 | 42 | protected $reCaptcha = [ |
43 | - 'public_key' => 'Your Recapture Public Key', // "site_key" |
|
44 | - 'private_key' => 'Your Recapture Private Key', // "secret_key" |
|
45 | - 'ssl' => true, // include google api via http(s) |
|
43 | + 'public_key' => 'Your Recapture Public Key', // "site_key" |
|
44 | + 'private_key' => 'Your Recapture Private Key', // "secret_key" |
|
45 | + 'ssl' => true, // include google api via http(s) |
|
46 | 46 | ]; |
47 | 47 | |
48 | 48 | /** |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $service = $serviceLocator->getServiceLocator(); |
32 | 32 | |
33 | 33 | $searchForm = $service->get('forms') |
34 | - ->get('Jobs/ListFilter', [ 'fieldset' => 'Jobs/ListFilterAdminFieldset' ]); |
|
34 | + ->get('Jobs/ListFilter', ['fieldset' => 'Jobs/ListFilterAdminFieldset']); |
|
35 | 35 | |
36 | 36 | /* @var $user \Auth\Entity\User */ |
37 | 37 | $user = $service->get('AuthenticationService')->getUser(); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $serviceLocator = $serviceLocator->getServiceLocator(); |
33 | 33 | |
34 | 34 | $searchForm = $serviceLocator->get('forms') |
35 | - ->get('Jobs/ListFilter', [ 'fieldset' => 'Jobs/ListFilterPersonalFieldset' ]); |
|
35 | + ->get('Jobs/ListFilter', ['fieldset' => 'Jobs/ListFilterPersonalFieldset']); |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @var $jobRepository Repository\Job |
@@ -46,9 +46,9 @@ |
||
46 | 46 | * |
47 | 47 | * fieldset: string Servicename of the Fieldset class |
48 | 48 | */ |
49 | - public function __construct($name, array $options=[]) |
|
49 | + public function __construct($name, array $options = []) |
|
50 | 50 | { |
51 | - $this->fieldset = array_key_exists('fieldset',$options)?$options['fieldset']:self::BASE_FIELDSET; |
|
51 | + $this->fieldset = array_key_exists('fieldset', $options) ? $options['fieldset'] : self::BASE_FIELDSET; |
|
52 | 52 | parent::__construct(); |
53 | 53 | } |
54 | 54 |