mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Moved the logout functionality into its own controller and files
This commit is contained in:
parent
63da7afce2
commit
246d25c7f4
3 changed files with 37 additions and 6 deletions
34
application/controllers/Logout.php
Normal file
34
application/controllers/Logout.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Easy!Appointments - Open Source Web Scheduler
|
||||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
||||
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link https://easyappointments.org
|
||||
* @since v1.0.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Logout controller.
|
||||
*
|
||||
* Handles the logout page functionality.
|
||||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class Logout extends EA_Controller {
|
||||
/**
|
||||
* Render the logout page.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->session->sess_destroy();
|
||||
|
||||
$this->load->view('pages/logout', [
|
||||
'base_url' => config('base_url'),
|
||||
'company_name' => setting('company_name')
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -50,15 +50,12 @@ class User extends EA_Controller {
|
|||
|
||||
/**
|
||||
* Display the logout page.
|
||||
*
|
||||
* @deprecated Since 1.5 Use the Logout controller instead.
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
$this->session->sess_destroy();
|
||||
|
||||
$this->load->view('pages/account_logout_page', [
|
||||
'base_url' => config('base_url'),
|
||||
'company_name' => setting('company_name')
|
||||
]);
|
||||
redirect('logout');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue