Skip to content

Commit 15767a1

Browse files
committed
php 8.1
1 parent 556f836 commit 15767a1

File tree

5 files changed

+43
-43
lines changed

5 files changed

+43
-43
lines changed

config/module.config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
'doctrine' => array(
55
'driver' => array(
66
'lmcuser_entity' => array(
7-
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
7+
'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
88
'cache' => 'array',
9-
'paths' => __DIR__ . '/../src/Entity'
9+
'paths' => [__DIR__ . '/../src/Entity']
1010
),
1111

1212
'orm_default' => array(

src/Controller/Admin/LoginController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function loginAction()
3939
$request = $this->getRequest();
4040
$form = $this->getLoginForm();
4141

42-
$user = $this->lmcuserAuthentication()->getIdentity();
42+
$user = $this->lmcUserAuthentication()->getIdentity();
4343
$authAdminConfig = $this->getOptions()->getAdmin();
4444

4545
if ($user && $this->isAllowed($authAdminConfig['resource'], $authAdminConfig['privilege'])) {
@@ -56,9 +56,9 @@ public function loginAction()
5656
}
5757

5858
// clear adapters
59-
$this->lmcuserAuthentication()->getAuthAdapter()->resetAdapters();
60-
$this->lmcuserAuthentication()->getAuthAdapter()->logoutAdapters();
61-
$this->lmcuserAuthentication()->getAuthService()->clearIdentity();
59+
$this->lmcUserAuthentication()->getAuthAdapter()->resetAdapters();
60+
$this->lmcUserAuthentication()->getAuthAdapter()->logoutAdapters();
61+
$this->lmcUserAuthentication()->getAuthService()->clearIdentity();
6262

6363
$request->getQuery()->redirect = $this->url()->fromRoute($authAdminConfig['route_login']);
6464
$request->getQuery()->routeLoginAdmin = $authAdminConfig['route_login'];
@@ -73,11 +73,11 @@ public function loginAction()
7373

7474
public function logoutAction()
7575
{
76-
$user = $this->lmcuserAuthentication()->getIdentity();
76+
$user = $this->lmcUserAuthentication()->getIdentity();
7777

78-
$this->lmcuserAuthentication()->getAuthAdapter()->resetAdapters();
79-
$this->lmcuserAuthentication()->getAuthAdapter()->logoutAdapters();
80-
$this->lmcuserAuthentication()->getAuthService()->clearIdentity();
78+
$this->lmcUserAuthentication()->getAuthAdapter()->resetAdapters();
79+
$this->lmcUserAuthentication()->getAuthAdapter()->logoutAdapters();
80+
$this->lmcUserAuthentication()->getAuthService()->clearIdentity();
8181

8282
if ($user) {
8383
$this->getEventManager()->trigger('logout.post', $this, array('user' => $user));

src/Controller/Frontend/ForgotController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getServiceLocator()
7070
public function indexAction()
7171
{
7272
//$this->getServiceLocator()->get('Laminas\Log')->info('ForgotAction...');
73-
if ($this->lmcuserAuthentication()->hasIdentity()) {
73+
if ($this->lmcUserAuthentication()->hasIdentity()) {
7474
return $this->redirect()->toRoute('frontend/lmcuser');
7575
} else {
7676
return $this->redirect()->toRoute('frontend/lmcuser/forgotpassword');

src/Controller/Frontend/UserController.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function loginAction()
8484
}
8585

8686
// clear adapters
87-
$this->lmcuserAuthentication()->getAuthAdapter()->resetAdapters();
88-
$this->lmcuserAuthentication()->getAuthService()->clearIdentity();
87+
$this->lmcUserAuthentication()->getAuthAdapter()->resetAdapters();
88+
$this->lmcUserAuthentication()->getAuthService()->clearIdentity();
8989

9090
return $this->forward()->dispatch('playgrounduser_user', array('action' => 'authenticate'));
9191
}
@@ -95,7 +95,7 @@ public function loginAction()
9595
*/
9696
public function registerAction()
9797
{
98-
if ($this->lmcuserAuthentication()->hasIdentity()) {
98+
if ($this->lmcUserAuthentication()->hasIdentity()) {
9999

100100
return $this->redirect()->toUrl($this->url()->fromRoute($this->getOptions()->getLoginRedirectRoute()));
101101
}
@@ -309,8 +309,8 @@ public function ajaxloginAction()
309309
'success' => 0
310310
)));
311311
} else {
312-
$this->lmcuserAuthentication()->getAuthAdapter()->resetAdapters();
313-
$this->lmcuserAuthentication()->getAuthService()->clearIdentity();
312+
$this->lmcUserAuthentication()->getAuthAdapter()->resetAdapters();
313+
$this->lmcUserAuthentication()->getAuthService()->clearIdentity();
314314
$result = $this->forward()->dispatch('playgrounduser_user', array(
315315
'action' => 'ajaxauthenticate'
316316
));
@@ -336,22 +336,22 @@ public function ajaxauthenticateAction()
336336
{
337337
// $this->getServiceLocator()->get('Laminas\Log')->info('ajaxloginAction -
338338
// AUTHENT : ');
339-
if ($this->lmcuserAuthentication()
339+
if ($this->lmcUserAuthentication()
340340
->getAuthService()
341341
->hasIdentity()) {
342342
return true;
343343
}
344-
$adapter = $this->lmcuserAuthentication()->getAuthAdapter();
344+
$adapter = $this->lmcUserAuthentication()->getAuthAdapter();
345345
$adapter->prepareForAuthentication($this->getRequest());
346-
$auth = $this->lmcuserAuthentication()->getAuthService()->authenticate($adapter);
346+
$auth = $this->lmcUserAuthentication()->getAuthService()->authenticate($adapter);
347347

348348
if (! $auth->isValid()) {
349349
$adapter->resetAdapters();
350350

351351
return false;
352352
}
353353

354-
$user = $this->lmcuserAuthentication()->getIdentity();
354+
$user = $this->lmcUserAuthentication()->getIdentity();
355355

356356
if ($user->getState() && $user->getState() === 2) {
357357
$this->getUserService()->getUserMapper()->activate($user);
@@ -389,12 +389,12 @@ public function providerLoginAction()
389389

390390
public function logoutAction()
391391
{
392-
$user = $this->lmcuserAuthentication()->getIdentity();
392+
$user = $this->lmcUserAuthentication()->getIdentity();
393393
//Hybrid_Auth::logoutAllProviders();
394394

395-
$this->lmcuserAuthentication()->getAuthAdapter()->resetAdapters();
396-
$this->lmcuserAuthentication()->getAuthAdapter()->logoutAdapters();
397-
$this->lmcuserAuthentication()->getAuthService()->clearIdentity();
395+
$this->lmcUserAuthentication()->getAuthAdapter()->resetAdapters();
396+
$this->lmcUserAuthentication()->getAuthAdapter()->logoutAdapters();
397+
$this->lmcUserAuthentication()->getAuthService()->clearIdentity();
398398

399399
$redirect = $this->params()->fromPost('redirect', $this->params()->fromQuery('redirect', false));
400400

@@ -415,10 +415,10 @@ public function logoutAction()
415415
*/
416416
public function authenticateAction()
417417
{
418-
if ($this->lmcuserAuthentication()->getAuthService()->hasIdentity()) {
418+
if ($this->lmcUserAuthentication()->getAuthService()->hasIdentity()) {
419419
return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());
420420
}
421-
$adapter = $this->lmcuserAuthentication()->getAuthAdapter();
421+
$adapter = $this->lmcUserAuthentication()->getAuthAdapter();
422422
$redirect = $this->params()->fromPost('redirect', $this->params()->fromQuery('redirect', false));
423423

424424
$routeLoginAdmin = $this->params()->fromPost('routeLoginAdmin', $this->params()->fromQuery('routeLoginAdmin', false));
@@ -430,7 +430,7 @@ public function authenticateAction()
430430
return $result;
431431
}
432432

433-
$auth = $this->lmcuserAuthentication()->getAuthService()->authenticate($adapter);
433+
$auth = $this->lmcUserAuthentication()->getAuthService()->authenticate($adapter);
434434

435435
if (!$auth->isValid()) {
436436
$this->flashMessenger()->setNamespace('lmcuser-login-form')->addMessage($this->failedLoginMessage);
@@ -446,7 +446,7 @@ public function authenticateAction()
446446
);
447447
}
448448

449-
$user = $this->lmcuserAuthentication()->getIdentity();
449+
$user = $this->lmcUserAuthentication()->getIdentity();
450450
$this->getEventManager()->trigger('authenticate.post', $this, array('user' => $user));
451451

452452
if ($this->getOptions()->getUseRedirectParameterIfPresent() && $redirect) {
@@ -472,7 +472,7 @@ public function profileAction()
472472
} catch (\Exception $e) {
473473
//echo ($e->getMessage());
474474
}
475-
if (! $this->lmcuserAuthentication()->hasIdentity()) {
475+
if (! $this->lmcUserAuthentication()->hasIdentity()) {
476476
return $this->redirect()->toUrl(
477477
$this->url()->fromRoute(
478478
$this->getOptions()->getLoginRedirectRoute(),
@@ -529,14 +529,14 @@ public function profileAction()
529529
$formInfo = $this->getChangeInfoForm();
530530
$formPrize = $this->getPrizeCategoryForm();
531531
$formBlock = $this->getBlockAccountForm();
532-
if ($this->lmcuserAuthentication()->getIdentity()->getState() == 2) {
532+
if ($this->lmcUserAuthentication()->getIdentity()->getState() == 2) {
533533
$formBlock->get('activate')->setAttribute('value', 1);
534534
$formBlock->get('submit')->setAttribute('value', $translator->translate('Reactivate my account', 'playgrounduser'));
535535
$formBlock->get('confirm_submit')->setAttribute('value', $translator->translate('Confirm account reactivation', 'playgrounduser'));
536536
}
537537

538538
$categoryService = $this->getServiceLocator()->get('playgroundgame_prizecategoryuser_service');
539-
$categoriesUser = $categoryService->getPrizeCategoryUserMapper()->findBy(array('user' => $this->lmcuserAuthentication()->getIdentity()));
539+
$categoriesUser = $categoryService->getPrizeCategoryUserMapper()->findBy(array('user' => $this->lmcUserAuthentication()->getIdentity()));
540540
$existingCategories = array();
541541

542542
foreach ($categoriesUser as $categoryUser) {
@@ -771,7 +771,7 @@ public function profileAction()
771771
*/
772772
public function addressAction()
773773
{
774-
if (! $this->lmcuserAuthentication()->hasIdentity()) {
774+
if (! $this->lmcUserAuthentication()->hasIdentity()) {
775775
return null;
776776
}
777777
$form = $this->getAddressForm();
@@ -824,15 +824,15 @@ public function registerFacebookUserAction()
824824
$provider = $this->params()->fromRoute('provider');
825825
$this->getRequest()->getQuery()->provider = $provider;
826826

827-
$this->lmcuserAuthentication()->getAuthAdapter()->resetAdapters();
828-
$this->lmcuserAuthentication()->getAuthService()->clearIdentity();
827+
$this->lmcUserAuthentication()->getAuthAdapter()->resetAdapters();
828+
$this->lmcUserAuthentication()->getAuthService()->clearIdentity();
829829

830-
$adapter = $this->lmcuserAuthentication()->getAuthAdapter();
830+
$adapter = $this->lmcUserAuthentication()->getAuthAdapter();
831831
$adapter->prepareForAuthentication($this->getRequest());
832832

833-
$this->lmcuserAuthentication()->getAuthService()->authenticate($adapter);
833+
$this->lmcUserAuthentication()->getAuthService()->authenticate($adapter);
834834

835-
$user = $this->lmcuserAuthentication()->getIdentity();
835+
$user = $this->lmcUserAuthentication()->getIdentity();
836836

837837
$viewModel = new ViewModel();
838838
$viewModel->setVariables(array('user' => $user));
@@ -843,7 +843,7 @@ public function registerFacebookUserAction()
843843
public function blockAccountAction()
844844
{
845845
// if the user isn't logged in, we can't change password
846-
if (!$this->lmcuserAuthentication()->hasIdentity()) {
846+
if (!$this->lmcUserAuthentication()->hasIdentity()) {
847847
return $this->redirect()->toUrl(
848848
$this->url()->fromRoute('frontend/lmcuser/profile')
849849
);
@@ -869,7 +869,7 @@ public function prizeCategoryUserAction()
869869
if ($this->getRequest()->isPost()) {
870870
$data = $this->getRequest()->getPost()->toArray();
871871
$service = $this->getServiceLocator()->get('playgroundgame_prizecategoryuser_service');
872-
$result = $service->edit($data, $this->lmcuserAuthentication()->getIdentity(), 'playgroundgame_prizecategoryuser_form');
872+
$result = $service->edit($data, $this->lmcUserAuthentication()->getIdentity(), 'playgroundgame_prizecategoryuser_form');
873873
if ($result) {
874874
$this->flashMessenger()
875875
->setNamespace('playgroundgame')
@@ -888,7 +888,7 @@ public function prizeCategoryUserAction()
888888
public function newsletterAction()
889889
{
890890
// if the user isn't logged in, we can't change password
891-
if (!$this->lmcuserAuthentication()->hasIdentity()) {
891+
if (!$this->lmcUserAuthentication()->hasIdentity()) {
892892
return $this->redirect()->toUrl(
893893
$this->url()->fromRoute('frontend/lmcuser/profile')
894894
);
@@ -925,14 +925,14 @@ public function ajaxNewsletterAction()
925925
$request = $this->getRequest();
926926
$response = $this->getResponse();
927927

928-
if (!$this->lmcuserAuthentication()->hasIdentity()) {
928+
if (!$this->lmcUserAuthentication()->hasIdentity()) {
929929
$response->setContent(\Laminas\Json\Json::encode(array(
930930
'success' => 0
931931
)));
932932
} else {
933933
if ($request->isPost()) {
934934
$data = $this->getRequest()->getPost()->toArray();
935-
$data['optinPartner'] = $this->lmcuserAuthentication()->getIdentity()->getOptinPartner();
935+
$data['optinPartner'] = $this->lmcUserAuthentication()->getIdentity()->getOptinPartner();
936936

937937
if ($this->getUserService()->updateNewsletter($data)) {
938938
$response->setContent(\Laminas\Json\Json::encode(array(

src/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function ($e) {
105105
$areaName = ($areaName == 'frontend' || $areaName == 'admin')? $areaName : 'frontend';
106106
$actionName = $match->getParam('action', 'not-found');
107107

108-
$user = $controller->lmcuserAuthentication()->getIdentity();
108+
$user = $controller->lmcUserAuthentication()->getIdentity();
109109
$logFrontendUser = (isset($config['playgrounduser']['log_frontend_user'])) ? $config['playgrounduser']['log_frontend_user'] : false;
110110
$logAdminUser = (isset($config['playgrounduser']['log_admin_user'])) ? $config['playgrounduser']['log_admin_user'] : false;
111111

0 commit comments

Comments
 (0)