1313
1414use Flextype \Component \Arrays \Arrays ;
1515use Flextype \Component \Filesystem \Filesystem ;
16- use Flextype \ Component \ Session \ Session ;
16+
1717use Psr \Http \Message \ResponseInterface as Response ;
1818use Psr \Http \Message \ServerRequestInterface as Request ;
1919use 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 ' );
0 commit comments