Код: Выделить всё
public function check_unique_id_from_db_for_secuity(){
$needle=base64_decode($this->uri->segment(3));
$haystack=$this->User_model->get_all_unique_ids();
$data2=array();
foreach($haystack as $key=>$value){
array_push($data2,$value['unique_id']);
}
$status="";
if(in_array($needle,$data2))
{
$status= "Exist";
}
else
{
$status= "Not Exist";
}
if($status=="Not Exist") {
redirect("User/logout");
}
echo $this->session->userdata('user');
if ($this->session->userdata('user') !== FALSE) {
} else {
redirect("User/logout");
}
}
Подробнее здесь: https://stackoverflow.com/questions/472 ... isbehaving
Мобильная версия