@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $eventManager->attach( |
93 | 93 | MvcEvent::EVENT_ROUTE, |
94 | - function (MvcEvent $e) use ($services) { |
|
94 | + function(MvcEvent $e) use ($services) { |
|
95 | 95 | /** @var CheckPermissionsListener $checkPermissionsListener */ |
96 | 96 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
97 | 97 | $checkPermissionsListener->onRoute($e); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $eventManager->attach( |
103 | 103 | MvcEvent::EVENT_DISPATCH, |
104 | - function (MvcEvent $e) use ($services) { |
|
104 | + function(MvcEvent $e) use ($services) { |
|
105 | 105 | /** @var CheckPermissionsListener $checkPermissionsListener */ |
106 | 106 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
107 | 107 | $checkPermissionsListener->onDispatch($e); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * for multiple paths. |
24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
25 | 25 | */ |
26 | - 'paths' => array( __DIR__ . '/../src/Auth/Entity'), |
|
26 | + 'paths' => array(__DIR__ . '/../src/Auth/Entity'), |
|
27 | 27 | ), |
28 | 28 | ), |
29 | 29 | ), |
@@ -97,35 +97,35 @@ discard block |
||
97 | 97 | ) |
98 | 98 | ), |
99 | 99 | 'hybridauth' => array( |
100 | - "Facebook" => array ( |
|
100 | + "Facebook" => array( |
|
101 | 101 | "enabled" => true, |
102 | - "keys" => array ( "id" => "", "secret" => "" ), |
|
102 | + "keys" => array("id" => "", "secret" => ""), |
|
103 | 103 | "scope" => 'email, user_about_me, user_birthday, user_hometown, user_website', |
104 | 104 | "display" => 'popup', |
105 | 105 | ), |
106 | - "LinkedIn" => array ( |
|
106 | + "LinkedIn" => array( |
|
107 | 107 | "enabled" => true, |
108 | - "keys" => array ( "key" => "", "secret" => "" ), |
|
108 | + "keys" => array("key" => "", "secret" => ""), |
|
109 | 109 | ), |
110 | - "XING" => array ( |
|
110 | + "XING" => array( |
|
111 | 111 | "enabled" => true, |
112 | 112 | // This is a hack due to bad design of HybridAuth |
113 | 113 | // There's no simpler way to include "additional-providers" |
114 | - "wrapper" => array ( |
|
114 | + "wrapper" => array( |
|
115 | 115 | 'class' => 'Hybrid_Providers_XING', |
116 | 116 | 'path' => __FILE__, |
117 | 117 | ), |
118 | - "keys" => array ( "key" => "", "secret" => "" ), |
|
118 | + "keys" => array("key" => "", "secret" => ""), |
|
119 | 119 | ), |
120 | - "Github" => array ( |
|
120 | + "Github" => array( |
|
121 | 121 | "enabled" => true, |
122 | 122 | // This is a hack due to bad design of HybridAuth |
123 | 123 | // There's no simpler way to include "additional-providers" |
124 | - "wrapper" => array ( |
|
124 | + "wrapper" => array( |
|
125 | 125 | 'class' => 'Hybrid_Providers_Github', |
126 | 126 | 'path' => __FILE__, |
127 | 127 | ), |
128 | - "keys" => array ( "key" => "", "secret" => "" ), |
|
128 | + "keys" => array("key" => "", "secret" => ""), |
|
129 | 129 | ), |
130 | 130 | |
131 | 131 | ), |
@@ -105,7 +105,7 @@ |
||
105 | 105 | |
106 | 106 | $results = $events->trigger( |
107 | 107 | $event, |
108 | - function ($r) { |
|
108 | + function($r) { |
|
109 | 109 | return false === $r; |
110 | 110 | } |
111 | 111 | ); |
@@ -123,7 +123,7 @@ |
||
123 | 123 | $eventManager = $event->getTarget()->getEventManager(); |
124 | 124 | $results = $eventManager->trigger(MvcEvent::EVENT_DISPATCH_ERROR, $event); |
125 | 125 | if (count($results)) { |
126 | - $return = $results->last(); |
|
126 | + $return = $results->last(); |
|
127 | 127 | } else { |
128 | 128 | $return = $e->getParams(); |
129 | 129 | } |
@@ -130,7 +130,7 @@ |
||
130 | 130 | $loginSuccess = false; |
131 | 131 | $loginResult = array(); |
132 | 132 | |
133 | - if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
133 | + if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
134 | 134 | $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with correct suffix: '); |
135 | 135 | // the login ends with the applicationID, therefore use the secret key |
136 | 136 | // the external login must be the form 'xxxxx@yyyy' where yyyy is the matching suffix to the external application key |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | /* */ |
106 | 106 | |
107 | 107 | $dm = $this->getRepository()->getDocumentManager(); |
108 | - if ( '' == $user->getInfo()->email) $user->getInfo()->email = $email; |
|
108 | + if ('' == $user->getInfo()->email) $user->getInfo()->email = $email; |
|
109 | 109 | $user->getInfo()->firstName = $userProfile->firstName; |
110 | 110 | $user->getInfo()->lastName = $userProfile->lastName; |
111 | 111 | $user->getInfo()->birthDay = $userProfile->birthDay; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $file->setBytes($response->getBody()); |
137 | 137 | |
138 | 138 | $userImage = new UserImage(); |
139 | - $userImage->setName($userProfile->lastName.$userProfile->firstName); |
|
139 | + $userImage->setName($userProfile->lastName . $userProfile->firstName); |
|
140 | 140 | $userImage->setType($response->getHeaders()->get('Content-Type')->getFieldValue()); |
141 | 141 | $userImage->setUser($user); |
142 | 142 | $userImage->setFile($file); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | public function profileAction() |
41 | 41 | { |
42 | 42 | $services = $this->getServiceLocator(); |
43 | - $container= $services->get('forms')->get('Auth/userprofilecontainer'); |
|
43 | + $container = $services->get('forms')->get('Auth/userprofilecontainer'); |
|
44 | 44 | $user = $services->get('AuthenticationService')->getUser(); |
45 | 45 | |
46 | 46 | $container->setEntity($user); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | $events->attach( |
50 | 50 | MvcEvent::EVENT_DISPATCH, |
51 | - function ($event) { |
|
51 | + function($event) { |
|
52 | 52 | $routeMatch = $event->getRouteMatch(); |
53 | 53 | $action = $routeMatch->getParam('action'); |
54 | 54 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | $events->attach( |
70 | 70 | MvcEvent::EVENT_DISPATCH, |
71 | - function ($event) { |
|
71 | + function($event) { |
|
72 | 72 | $model = $event->getResult(); |
73 | 73 | if (!$model instanceof ViewModel || $model->terminate()) { |
74 | 74 | return; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $users = $repository->findByQuery($query); |
199 | 199 | |
200 | 200 | $userFilter = $services->get('filtermanager')->get('Auth/Entity/UserToSearchResult'); |
201 | - $filterFunc = function ($user) use ($userFilter) { |
|
201 | + $filterFunc = function($user) use ($userFilter) { |
|
202 | 202 | return $userFilter->filter($user); |
203 | 203 | }; |
204 | 204 | $result = array_values(array_map($filterFunc, $users->toArray())); |
@@ -135,7 +135,7 @@ |
||
135 | 135 | $hybridAuth->restoreSessionData($sessionDataStored); |
136 | 136 | } |
137 | 137 | $adapter = $hybridAuth->authenticate($this->providerKey); |
138 | - $sessionData = $hybridAuth->getSessionData(); |
|
138 | + $sessionData = $hybridAuth->getSessionData(); |
|
139 | 139 | if ($sessionData != $sessionDataStored) { |
140 | 140 | $user->updateAuthSession($this->providerKey, $sessionData); |
141 | 141 | } |