Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
don
Commits
e0fa8dff
Commit
e0fa8dff
authored
Nov 03, 2019
by
Guinness
Browse files
Add a logoout button for the admin.
Fixes
#99
parent
35e0b626
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controller/admin.php
View file @
e0fa8dff
...
...
@@ -100,6 +100,12 @@ class Admin extends Controller
$f3
->
clear
(
'SESSION.error'
);
}
public
function
logout
(
$f3
,
$args
)
{
$f3
->
clear
(
'SESSION'
);
$f3
->
reroute
(
'/'
);
}
public
static
function
hash_password
(
$password
)
{
...
...
app/routes.ini
View file @
e0fa8dff
...
...
@@ -24,6 +24,7 @@ GET /cron/piplome/@id=Controller\Cron->piplome
; Pages d'administration
GET|POST
@admin:/
admin
=
Controller
\A
dmin->show
GET|POST
@admin_logout:/admin/
logout
=
Controller
\A
dmin->logout
GET
@add_support:/admin/support/
add
=
Controller
\A
dmin->support
GET
@edit_support:/admin/support/edit/@
id
=
Controller
\A
dmin->support
POST
@modify_support:/admin/support/
edit
=
Controller
\A
dmin->support
...
...
app/view/backend/toolbar.html
View file @
e0fa8dff
...
...
@@ -9,5 +9,6 @@
<li><a
href=
"{{ 'users' | alias }}"
>
Gestion des utilisateurs
</a></li>
<li><a
href=
"{{ 'stats' | alias }}"
>
Statistiques
</a></li>
<li><a
href=
"{{ 'admin_accounts' | alias }}"
>
Administrateurs
</a></li>
<li><a
href=
"{{ 'admin_logout' | alias }}"
>
Déconnexion
</a></li>
</ul>
</section>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment