From 259ca3ce115291dbb17e54b7792e67088a99158d Mon Sep 17 00:00:00 2001
From: Jansa Jose <jansa@techware.in>
Date: Mon, 30 Jul 2018 18:55:53 +0530
Subject: [PATCH] dctr re

---
 application/models/Home_model.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/models/Home_model.php b/application/models/Home_model.php
index cd983f0..2866108 100644
--- a/application/models/Home_model.php
+++ b/application/models/Home_model.php
@@ -381,6 +381,7 @@
 		else if($data['login_type']=="DOCTOR")
 
 		{
+			$this->db->select("tbl_doctors.*,CAST(AES_DECRYPT(name, 'Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') as CHAR) as name");
 
 			$query = $this->db->get_where("tbl_doctors",array("username"=>$data['login-form-username'],"password"=>md5($data['login-form-password'])));
 
@@ -572,7 +573,7 @@
 			$key = $this->config->item('encryption_key');
 			
 			//$this->db->query("update tbl_registration set dob = AES_ENCRYPT(".$data['dob'].",'Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA')where id = ".$insertid);
-			$this->db->query("Update tbl_doctors SET dob = AES_ENCRYPT(".$data['dob'].",".$key."), name = AES_ENCRYPT(".$data['name'].",".$key.") where id=".$insertid);		
+			$this->db->query("Update tbl_doctors SET dob = AES_ENCRYPT(".$data['dob'].",".$key."), name = AES_ENCRYPT('".$data['name']."',".$key.") where id=".$insertid);		
 
 			$this->db->insert('tbl_clinic_doctors',array('doctor_id'=>$insertid,'clinic_id'=> 0));	
 			$this->db->insert('tbl_consultation',array('doctor_id'=>$insertid,'clinic_id'=> 0,'date'=>'""','date_secondary'=>'""','active_schedule'=> 0));
--
libgit2 0.27.1