Skip to content

Commit

Permalink
Accounts Admin 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Dec 7, 2020
1 parent 78cbdf4 commit 0201f90
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Global
.composer
composer.lock
package-lock.json
vendor/
node_modules/
dist/

# Flextype Site Specific
var/

# OS Generated
.DS_Store*
ehthumbs.db
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.5.0"></a>
# [1.5.0](https://github.com/flextype-plugins/accounts-admin) (2020-12-07)

### Features

* **core** update code base for new Flextype 0.9.12

<a name="1.4.0"></a>
# [1.4.0](https://github.com/flextype-plugins/accounts-admin) (2020-08-25)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Sergey Romanenko
Copyright (c) 2021 Sergey Romanenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 8 additions & 6 deletions app/Controllers/AccountsAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Flextype\Component\Arrays\Arrays;
use Flextype\Component\Filesystem\Filesystem;
use Flextype\Component\Session\Session;

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use PHPMailer\PHPMailer\PHPMailer;
Expand Down Expand Up @@ -43,14 +43,14 @@ class AccountsAdminController
/**
* Flextype Application
*/


/**
* __construct
*/
public function __construct()
{

}

/**
Expand Down Expand Up @@ -314,6 +314,7 @@ public function deleteProcess(Request $request, Response $response, array $args)
*/
public function login(Request $request, Response $response, array $args) : Response
{

if (flextype('acl')->isUserLoggedIn()) {
return $response->withRedirect(flextype('router')->pathFor('admin.dashboard.index'));
}
Expand Down Expand Up @@ -351,6 +352,7 @@ public function loginProcess(Request $request, Response $response, array $args)
flextype('acl')->setUserLoggedInUuid($user_file['uuid']);
flextype('acl')->setUserLoggedIn(true);


// Run event onAccountsAdminUserLoggedIn
flextype('emitter')->emit('onAccountsAdminUserLoggedIn');

Expand Down Expand Up @@ -608,7 +610,7 @@ public function registrationProcess(Request $request, Response $response, array
}

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

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

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

return $response->withRedirect(flextype('router')->pathFor('admin.accounts.login'));
}
Expand All @@ -797,7 +799,7 @@ public function registrationProcess(Request $request, Response $response, array
*/
public function logoutProcess(Request $request, Response $response) : Response
{
Session::destroy();
flextype('session')->destroy();

// Run event onAccountsAdminLogout
flextype('emitter')->emit('onAccountsAdminLogout');
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"issues": "https://github.com/flextype-plugins/accounts-admin/issues"
},
"require": {
"php": ">=7.3.0"
"php": ">=7.3.0",
"flextype-components/arrays" : "3.0.1",
"flextype-components/filesystem": "2.0.8"
},
"config": {
"apcu-autoloader": true,
Expand Down
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Accounts Admin
version: 1.4.0
version: 1.5.0
description: Accounts Admin Plugin to manage users accounts in Flextype Admin Panel.
icon: fas fa-users
author:
Expand All @@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/accounts-admin/issues
license: MIT

dependencies:
flextype: 0.9.11
flextype: 0.9.12
twig: '>=1.0.0'
admin: '>=1.0.0'
form: '>=1.0.0'
Expand Down

0 comments on commit 0201f90

Please sign in to comment.