diff --git a/application/Controllers/Account/Home.php b/application/Controllers/Account/Home.php
new file mode 100644
index 0000000..0162975
--- /dev/null
+++ b/application/Controllers/Account/Home.php
@@ -0,0 +1,62 @@
+config = new AauthConfig();
+ $this->user = new UserModel();
+ $this->aauth = new Aauth();
+
+ if (! $this->aauth->isLoggedIn())
+ {
+ redirect()->to('/');
+ }
+ }
+
+ /**
+ * Index
+ *
+ * @return void
+ */
+ public function index()
+ {
+ // print_r($this->aauth->session);
+ // print_r($this->aauth->login("admin@example.com", "password123456"));
+ // print_r($this->aauth->deleteUser(4));
+ // print_r($this->aauth->updateUser(1, "admin@example.com", "password", 'Admines'));
+ // print_r($this->aauth->createUser("admin@example.coma", 'asdasasdasdsd'));
+
+ echo $this->aauth->printErrors('
', true);
+ }
+}
diff --git a/application/Controllers/Account/Logout.php b/application/Controllers/Account/Logout.php
index 7016233..b983bca 100644
--- a/application/Controllers/Account/Logout.php
+++ b/application/Controllers/Account/Logout.php
@@ -43,11 +43,11 @@ class Logout extends Controller
/**
* Index
*
- * @return redirect
+ * @return void
*/
public function index()
{
$this->aauth->logout();
- return redirect()->to('/');
+ redirect()->to('/');
}
}
diff --git a/application/Controllers/Admin/Home.php b/application/Controllers/Admin/Home.php
new file mode 100644
index 0000000..d5fbf8d
--- /dev/null
+++ b/application/Controllers/Admin/Home.php
@@ -0,0 +1,42 @@
+isLoggedIn();
+ }
+}
diff --git a/application/Libraries/Aauth.php b/application/Libraries/Aauth.php
index 56603b5..541fd26 100644
--- a/application/Libraries/Aauth.php
+++ b/application/Libraries/Aauth.php
@@ -751,7 +751,7 @@ class Aauth
public function logout()
{
helper('cookie');
- delete_cookie('remember');
+ set_cookie('remember', '', -3600);
$this->session->destroy();
}
diff --git a/application/Views/Home.php b/application/Views/Home.php
index 72a775e..b52a0c4 100644
--- a/application/Views/Home.php
+++ b/application/Views/Home.php
@@ -1,6 +1,4 @@
-
Aauth is a User Authorization Library for CodeIgniter 4.x, which aims to make easy some essential jobs such as login, permissions and access operations. Despite ease of use, it has also very advanced features like groupping, access management, public access etc..
-You can Login now and test it.
- Login -Aauth is a User Authorization Library for CodeIgniter 4.x, which aims to make easy some essential jobs such as login, permissions and access operations. Despite ease of use, it has also very advanced features like groupping, access management, public access etc..
+You can Login now and test it.
+Login diff --git a/application/Views/Templates/Footer.php b/application/Views/Templates/Footer.php index 94ddfb0..4176386 100644 --- a/application/Views/Templates/Footer.php +++ b/application/Views/Templates/Footer.php @@ -1,4 +1,10 @@ + + + + + + diff --git a/application/Views/Templates/FooterAdmin.php b/application/Views/Templates/FooterAdmin.php new file mode 100644 index 0000000..19e0da8 --- /dev/null +++ b/application/Views/Templates/FooterAdmin.php @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + if (isset($jsFiles)): ?> + foreach ($jsFiles as $jsFiles): ?> + + endforeach; ?> + endif; ?> +