submenu generation implemented
All checks were successful
Build and push / Pulling repo on server (push) Successful in 19s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 19s
This commit is contained in:
@ -12,6 +12,17 @@ class Login extends Page {
|
||||
$this->menu_priority = 99;
|
||||
}
|
||||
|
||||
function setSubmenu()
|
||||
{
|
||||
if($_SESSION['user'])
|
||||
{
|
||||
$this->addSubmenuItem('Settings', '/settings', 'fas fa-cog');
|
||||
$this->addSubmenuItem('Logout', '/login/logout', 'fas fa-sign-out-alt', 'bg-red-500');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->set('hello','world');
|
||||
@ -28,6 +39,12 @@ class Login extends Page {
|
||||
],true));
|
||||
}
|
||||
|
||||
function logout()
|
||||
{
|
||||
session_destroy();
|
||||
$this->redirect('/');
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
$email = $_REQUEST['email'];
|
||||
|
Reference in New Issue
Block a user