Skip to content

Commit 0201f90

Browse files
committed
Accounts Admin 1.5.0
1 parent 78cbdf4 commit 0201f90

6 files changed

Lines changed: 32 additions & 10 deletions

File tree

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Global
2+
.composer
3+
composer.lock
4+
package-lock.json
5+
vendor/
6+
node_modules/
7+
dist/
8+
9+
# Flextype Site Specific
10+
var/
11+
112
# OS Generated
213
.DS_Store*
314
ehthumbs.db

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<a name="1.5.0"></a>
2+
# [1.5.0](https://github.com/flextype-plugins/accounts-admin) (2020-12-07)
3+
4+
### Features
5+
6+
* **core** update code base for new Flextype 0.9.12
7+
18
<a name="1.4.0"></a>
29
# [1.4.0](https://github.com/flextype-plugins/accounts-admin) (2020-08-25)
310

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Sergey Romanenko
3+
Copyright (c) 2021 Sergey Romanenko
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

app/Controllers/AccountsAdminController.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Flextype\Component\Arrays\Arrays;
1515
use Flextype\Component\Filesystem\Filesystem;
16-
use Flextype\Component\Session\Session;
16+
1717
use Psr\Http\Message\ResponseInterface as Response;
1818
use Psr\Http\Message\ServerRequestInterface as Request;
1919
use PHPMailer\PHPMailer\PHPMailer;
@@ -43,14 +43,14 @@ class AccountsAdminController
4343
/**
4444
* Flextype Application
4545
*/
46-
46+
4747

4848
/**
4949
* __construct
5050
*/
5151
public function __construct()
5252
{
53-
53+
5454
}
5555

5656
/**
@@ -314,6 +314,7 @@ public function deleteProcess(Request $request, Response $response, array $args)
314314
*/
315315
public function login(Request $request, Response $response, array $args) : Response
316316
{
317+
317318
if (flextype('acl')->isUserLoggedIn()) {
318319
return $response->withRedirect(flextype('router')->pathFor('admin.dashboard.index'));
319320
}
@@ -351,6 +352,7 @@ public function loginProcess(Request $request, Response $response, array $args)
351352
flextype('acl')->setUserLoggedInUuid($user_file['uuid']);
352353
flextype('acl')->setUserLoggedIn(true);
353354

355+
354356
// Run event onAccountsAdminUserLoggedIn
355357
flextype('emitter')->emit('onAccountsAdminUserLoggedIn');
356358

@@ -608,7 +610,7 @@ public function registrationProcess(Request $request, Response $response, array
608610
}
609611

610612
// Clear cache before proccess
611-
flextype('cache')->purgeAll();
613+
Filesystem::deleteDir(PATH['tmp']);
612614

613615
// Get Data from POST
614616
$post_data = $request->getParsedBody();
@@ -778,7 +780,7 @@ public function registrationProcess(Request $request, Response $response, array
778780
Filesystem::write(PATH['project'] . '/config/plugins/accounts-admin/settings.yaml', flextype('yaml')->encode($accounts_admin_config));
779781

780782
// Clear cache after proccess
781-
flextype('cache')->purgeAll();
783+
Filesystem::deleteDir(PATH['tmp']);
782784

783785
return $response->withRedirect(flextype('router')->pathFor('admin.accounts.login'));
784786
}
@@ -797,7 +799,7 @@ public function registrationProcess(Request $request, Response $response, array
797799
*/
798800
public function logoutProcess(Request $request, Response $response) : Response
799801
{
800-
Session::destroy();
802+
flextype('session')->destroy();
801803

802804
// Run event onAccountsAdminLogout
803805
flextype('emitter')->emit('onAccountsAdminLogout');

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"issues": "https://github.com/flextype-plugins/accounts-admin/issues"
1717
},
1818
"require": {
19-
"php": ">=7.3.0"
19+
"php": ">=7.3.0",
20+
"flextype-components/arrays" : "3.0.1",
21+
"flextype-components/filesystem": "2.0.8"
2022
},
2123
"config": {
2224
"apcu-autoloader": true,

plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Accounts Admin
2-
version: 1.4.0
2+
version: 1.5.0
33
description: Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
44
icon: fas fa-users
55
author:
@@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/accounts-admin/issues
1111
license: MIT
1212

1313
dependencies:
14-
flextype: 0.9.11
14+
flextype: 0.9.12
1515
twig: '>=1.0.0'
1616
admin: '>=1.0.0'
1717
form: '>=1.0.0'

0 commit comments

Comments
 (0)