Files
web-sekolah/application/libraries/Setting_data.php
T
2026-06-26 13:37:55 +07:00

51 lines
1.0 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Setting_data
{
protected $CI2;
public function __construct()
{
$this->CI2 =& get_instance();
//load data model user
$this->CI2->load->model('setting_model');
}
//fungsi login
public function index()
{
$check = $this->CI2->setting_model->detail($id);
//jika ada user, maka create session login
if($check) {
$id = $check->id;
$tgl_sosialisasi = $check->tgl_sosialisasi;
//create session
$this->CI2->session->set_settingdata('id',$id);
$this->CI2->session->set_settingdata('tgl_sosialisasi',$tgl_sosialisasi);
}
}
//fungsi logout
public function logout()
{
//membuang semua session yang telah diset pada login
$this->CI2->session->unset_settingdata('id');
$this->CI2->session->unset_settingdata('tgl_sosialisasi');
}
}
/* End of file Simple_login.php */
/* End of file Simple_login.php */
/* Location: ./application/libraries/Simple_login.php */